opening a file opens it in Notepad
Lance
lbrannma at cablespeed.com
Thu Feb 6 00:55:44 EST 2003
Hi All,
I'm running PythonWin build 148 on Windows XP.
The following results in the file being opened in Notepad! This confuses me
greatly. I simply want the file handle. My next line is to read the file
into a string, using f1.read()
Any suggestions will be appreciated.
Also, I have a number of files in srcfiles. I imagine I must issue
f1.close() each time in the loop, yes?
for file in srcfiles:
f1 = open(file,"r")
... do stuff...
Thanks,
Lance
More information about the Python-list
mailing list