help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

execfile in python3 breaks emacs mode


From: Rustom Mody
Subject: execfile in python3 breaks emacs mode
Date: Sun, 4 Oct 2009 18:57:39 +0530

Removing execfile from python3 has broken the good-ol python-mode of emacs.

Changing the line

In python-mode.el in function py-execute-file changing the line
(cmd (format "execfile(r'%s') # PYTHON-MODE\n" filename)))

to
 (cmd (format "exec(open(r'%s').read()) # PYTHON-MODE\n" filename)))

seems to solve the problem

Since I am not quite upto the subtleties of what all has changed vis-a-vis exec/execfile, please inform me if this is ok


reply via email to

[Prev in Thread] Current Thread [Next in Thread]