Python path and append

Seymore4Head Seymore4Head at Hotmail.invalid
Tue Apr 19 18:29:38 EDT 2016


This doesn't work.  Does Python recognize hidden directories?

handle = open("\\Winmx\New$\q.txt")
for line in handle:
    line=line.strip()
    print line

    
Traceback (most recent call last):
  File "\\Winmx\New$\add viewed.py", line 2, in <module>
    handle = open("\\Winmx\New$\q.txt")
IOError: [Errno 2] No such file or directory: '\\Winmx\\New$\\q.txt'

What I would like to do is read a plain text file from a hidden
network drive and append a space and the * character to the end of
each line.

Would someone be so kind as to fill in the blanks to accomplish this
please?





More information about the Python-list mailing list