create a text file

Max Erickson maxerickson at gmail.com
Tue May 30 09:57:12 EDT 2006


"per9000" <per9000 at gmail.com> wrote:

> # w is for writing
> myfile = open('theoutfile',w)

That won't work, the second argument to open needs to be a string:

myfile  = open('theoutfile', 'w')


max




More information about the Python-list mailing list