opening a file opens it in Notepad

Lance lbrannma at
Thu Feb 6 06:55:44 CET 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
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...


More information about the Python-list mailing list