Menu

#758 python3 doesn't have "execfile" in "pywin\framework\interact.py"

v1.0 (example)
open
nobody
pythonwin (177)
7
2017-08-18
2017-08-18
arbeiter
No

file: pywin\framework\interact.py uses "execfile()" which is canceled in python3.

Apparently i'm the only python programmer who uses python startup file with pythonwin.exe.

This solution works for me (interact.py, instead of line 299) :

        if (sys.version_info > (3, 0)):
            exec(open(rcfile).read(), __main__.__dict__, __main__.__dict__)
        else:
            execfile(rcfile, __main__.__dict__, __main__.__dict__)

Discussion