(no subject)

Fredrik Lundh effbot at telia.com
Tue May 23 10:24:40 EDT 2000


Erik Wilsher <erik.wilsher at iname.com> wrote:
> Yes, and in addition try to use "raw" strings or double backslashes 
> in the file-name argument of the open call.
> 
>  >>>f=open(r'c:\temp\myfile.txt','r')
>  >>>f=open('c:\\temp\\myfile.txt','r')

or use forward slashes (yes, they work on Windows too):

    f = open('c:/temp/myfile.txt')

</F>




More information about the Python-list mailing list