How do I create a new file?

Joshua Macy amused at webamused.com
Tue Feb 1 21:26:44 EST 2000


bovinesoft at my-deja.com wrote:
> 
> 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.


f = open('test', 'w')

will open the file test for writing.

  Joshua



More information about the Python-list mailing list