How do I create a new file?

maxm maxm at normik.dk
Tue Feb 1 03:26:33 EST 2000


file = open("SomeFileName/somewhere.txt", "w")
file.write("This is the content")
file.close()

<bovinesoft at my-deja.com> wrote in message
news:875kjv$m8r$1 at nnrp1.deja.com...
> What code would I use if I wanted to create a new file in python?  If
> you could help me with this, I would be greatly appreciative.  Thanks
> again.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
> --
> http://www.python.org/mailman/listinfo/python-list
>





More information about the Python-list mailing list