On 04/02/13 11:12, Spyros Charonis wrote:
What I am trying to do is basically the Unix shell equivalent of: "Unix command" > newfile.txt
That works just fine with Python too. Just print to stdout in whatever format you want and redirect the output to a file
$ python myscript.py > myfile.txt That will work from a command line in Windows, Linux and MacOS...
I am trying to store the list that I get from my code in a separate file, in human-readable format.
Then print it in the format you want using string formatting to control spacing, justification etc.
-- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor