Re: print shell output in a file

2006-07-01 Thread Scott David Daniels
Juergen Huber wrote: ... > here is the print command, which delivers me the following output (see > below) on the shell: > print '%-30s | %-12d | %-12d |%-12d ' % (typename, > size / count, > count,

Re: print shell output in a file

2006-06-30 Thread Juho Schultz
Juergen Huber wrote: > hello, > > one more question i will have! > > now i have written a little programm, which delivers me an output on the > shell! > > > Is there a way to put this output in an file?!?! i searched about 2h for > this, but i couldn`t find an answer! > > thnks, juergen Others h

Re: print shell output in a file

2006-06-30 Thread Juergen Huber
hello, if i would type in your code, i became the following output in the "output.txt" - file BOOL | 4 | 50463|201852 but why?! he wouldn´t do that for all the entrys in the csv file! but only for the first one in the file! Stephan Wassipaul wrote: > f = file('output.txt','w'

Re: print shell output in a file

2006-06-30 Thread Stephan Wassipaul
f = file('output.txt','w') print >>f, '%-30s | %-12d | %-12d |%-12d ' % (typename, size / count, count, size) f.close() > hello, > > one more question i will

Re: print shell output in a file

2006-06-30 Thread tac-tics
It sounds like you want to use print >> If you have an open object with a "write" property, you can do print >> thefile, mystring and Python will simply redirect the output to "thefile" instead of sys.stdout. -- http://mail.python.org/mailman/listinfo/python-list