Re: Python printout
On Tuesday, 27 November 2012 15:00:29 UTC+5:30, Avrajit Chatterjee wrote: I have multiple list and want to invoke a single prinout which will give a print preview of all list in Grid format in a different pages. I have tried wx.lib.printout.PrintTable but it takes only one table at a time. Any clues how to achieve this? Didnt find any good way of doing it , hence printed all in a excel in background and used VBS win32 lib to print the excel sheet by selecting the print area. -- http://mail.python.org/mailman/listinfo/python-list
Python printout
I have multiple list and want to invoke a single prinout which will give a print preview of all list in Grid format in a different pages. I have tried wx.lib.printout.PrintTable but it takes only one table at a time. Any clues how to achieve this? -- http://mail.python.org/mailman/listinfo/python-list
python printout format
Hi, I have a data set like row = [[1,2,3,4,5], [6,7,8,9,10], [11,12,13,14,15]] when I use loop to print out data, I got compile error in printout statment. while j24: print ' ',string.ljust(str(units[0]), 5), print ' ',string.ljust(str(ports[j], 3), print ' ',string.ljust(PortlinkbeatInv[row[j][0]],14), print ' ',string.ljust(PortStatusInv[row[j][1]], 19), print ' ',string.ljust(PortTestResultInv[row[j][2]],17), print ' ',string.ljust(PortVisualInv[row[j][3]],19), print ' ',string.ljust(PortAddrVioInv[row[j][4]],15) j=j+1 misc.doPg('Port status listing on ' + tag + ' (Page %d):', vals,doBanner,doRow) Error messages are: python -c import compileall; compileall.compile_dir('.',0) Listing . ... Compiling ./Ciscoports.py ... File ./Ciscoports.py, line 753 print string.ljust(PortlinkbeatInv[row[j][0]],14), ^ SyntaxError: invalid syntax How should I change to printout row data [1,2,3,4,5] in one row in assigned format? Many thanks, Yong -- http://mail.python.org/mailman/listinfo/python-list
Re: python printout format
Yong, Are you sure you indent with the same characters and there is no non-print code there? --eric On 1 feb 2006, at 17:36, Yong Wang wrote: Hi, I have a data set like row = [[1,2,3,4,5], [6,7,8,9,10], [11,12,13,14,15]] when I use loop to print out data, I got compile error in printout statment. while j24: print ' ',string.ljust(str(units[0]), 5), print ' ',string.ljust(str(ports[j], 3), print ' ',string.ljust(PortlinkbeatInv[row[j][0]],14), print ' ',string.ljust(PortStatusInv[row[j][1]], 19), print ' ',string.ljust(PortTestResultInv[row[j][2]],17), print ' ',string.ljust(PortVisualInv[row[j][3]],19), print ' ',string.ljust(PortAddrVioInv[row[j][4]],15) j=j+1 misc.doPg('Port status listing on ' + tag + ' (Page %d):', vals,doBanner,doRow) Error messages are: python -c import compileall; compileall.compile_dir('.',0) Listing . ... Compiling ./Ciscoports.py ... File ./Ciscoports.py, line 753 print string.ljust(PortlinkbeatInv[row[j][0]],14), ^ SyntaxError: invalid syntax How should I change to printout row data [1,2,3,4,5] in one row in assigned format? Many thanks, Yong -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: python printout format
Yong Wang wrote: Hi, I have a data set like row = [[1,2,3,4,5], [6,7,8,9,10], [11,12,13,14,15]] when I use loop to print out data, I got compile error in printout statment. while j24: print ' ',string.ljust(str(units[0]), 5), print ' ',string.ljust(str(ports[j], 3), print ' ',string.ljust(PortlinkbeatInv[row[j][0]],14), print ' ',string.ljust(PortStatusInv[row[j][1]], 19), print ' ',string.ljust(PortTestResultInv[row[j][2]],17), print ' ',string.ljust(PortVisualInv[row[j][3]],19), print ' ',string.ljust(PortAddrVioInv[row[j][4]],15) j=j+1 misc.doPg('Port status listing on ' + tag + ' (Page %d):', vals,doBanner,doRow) Error messages are: python -c import compileall; compileall.compile_dir('.',0) Listing . ... Compiling ./Ciscoports.py ... File ./Ciscoports.py, line 753 print string.ljust(PortlinkbeatInv[row[j][0]],14), ^ SyntaxError: invalid syntax The problem here is that the previous line has unbalanced parentheses. Fix that, and there should be no problem with this line. Gary Herron How should I change to printout row data [1,2,3,4,5] in one row in assigned format? Many thanks, Yong -- http://mail.python.org/mailman/listinfo/python-list