On 4/15/2012 5:13 AM, contro opinion wrote:

 >>> f=open(r'c:\windows\temp\test','r')

 >>> f=open('c:\\windows\\temp\\test','r')

Your life will be much happier is you use forward slashes for filenames in Python programs.
f = open('c:/windows/temp/test', 'r')

You only need backslashes when entering filenames in Command Prompt window that Command Prompt must interpret as a path.

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to