Reputation: 362
All I want to do is create a file (doesn't matter the extension) in a windows directory using Python.
I cannot find any reference to this specific function anywhere currently.
Upvotes: 0
Views: 98
Reputation: 441
open(filename, "w")
might be what you're looking for. The "w"
argument means write and will create that file if it doesnt already exist. If it does exist, it will overwrite the contents if written to. Python I/O Documentation
Upvotes: 1
Reputation: 33
You would use write() for this, using a file name that you haven't used before.
http://www.tutorialspoint.com/python/file_write.htm
Upvotes: 1