Yes. You could do: Python 2.4.2 (#2, Sep 30 2005, 21:19:01) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> fileobj=open('~\myfile.txt','w') >>> fileobj.write("test") >>> fileobj.close()
On Windows, for the path to your file, you could write r'C:\myfile.txt' (if C:\ is a place you can write to.) also, see the output from >>> help("open") -- http://mail.python.org/mailman/listinfo/python-list