Re: Reading a file using a UNC - help!

2006-09-26 Thread richard . kessler
Thanks very much all for respondingI got it working. As you indicated, I just had mixed up my escapes (//) with my \n. When I got the correct amount of backslashes and removed the linefeeds it worked great. Thanks again. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading a file using a UNC - help!

2006-09-26 Thread johnzenger
You should use os.path.exists to test if a file exists. Your exception-catching structure is not necessary. Also, if the file you are reading from contains proper Windows filenames, it is not necessary to replace \ with \\ and so forth. The \ acts as an escape character only when it is in Python

Re: Reading a file using a UNC - help!

2006-09-26 Thread Robert Kern
[EMAIL PROTECTED] wrote: > I have the simplest need...to read a file full of file names(unc) and > then check to see if each of these files exists. I tried with the > following program, but always get file not found, even when it is > there. If I type in the file name as a literal it works... > >

Reading a file using a UNC - help!

2006-09-26 Thread richard . kessler
I have the simplest need...to read a file full of file names(unc) and then check to see if each of these files exists. I tried with the following program, but always get file not found, even when it is there. If I type in the file name as a literal it works... Little program: #This module checks