William O'Higgins wrote:
> When I am open()-ing a file, I sort of expect that if the file doesn't
> exist that it would be created, but it doesn't, it whines about it
> instead.  So, how do I create a file with Python?  I've looked all over,
> but I'm obviously missing something.  Thanks.

Opening a file for writing will create it:

f = open('myfile.txt', 'w')

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to