"Lawrence Barrott" <[EMAIL PROTECTED]> wrote

> using the built in function "open" how do you specify non local
> files such as the C: drive without copying the program there

Just provide the full path to the file.

f = open(r"C:\TEMP\somefile.txt")

Note the use of raw to avoid problems with the DOS backslash 
character.
Another option is to use forward slashes which python accepts too:

f = open("C:/TEMP/somefile.txt")


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


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

Reply via email to