create a text file

per9000 per9000 at gmail.com
Tue May 30 06:06:01 EDT 2006


Hi,

This is what I often do:

somekindofoutput = ''
somekindofoutput += somefunk(somearg) + '\n'

# w is for writing
myfile = open('theoutfile',w)
myfile.write(somekindofoutput)
myfile.close()

also see
http://www.python.org/doc/2.3.5/tut/node9.html
or some other documentation

/P9k




More information about the Python-list mailing list