opening a file opens it in Notepad

Lance lbrannma at cablespeed.com
Thu Feb 6 09:34:37 EST 2003


Thanks all for the solution.....indeed I had "from webbrowser import open"
in my code....

Lance


"Lance" <lbrannma at cablespeed.com> wrote in message
news:v43ss1b35fbcc at corp.supernews.com...
> 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