[Python-mode] execfile
Barry Warsaw
barry at python.org
Mon Jun 13 23:07:44 CEST 2011
On May 20, 2011, at 01:41 PM, Andreas Röhler wrote:
>think we should get the execfile issue fixed with next release too.
Definitely. Sorry for letting this one get buried in my inbox, but I've now
commented on the issue.
>What about introducing a var indicating the python version the code is
>intended to?
+1
>In case that var isn't set, the python version which py-execute-region would
>call, may be queried on the fly.
>
>Should I look for this?
Yes please! python-mode.el should know whether the file it's visiting is
Python 2 or Python 3, probably in a local variable which could be set
automatically if you can find a decent clue (e.g. #!/usr/bin/python3). You
might want to think of other ways to set this (file local variables, or
auto-mode-alist perhaps?) Once you have that, then the mode can do all sorts
of version-specific things, like doing different font-locking, or firing off a
different Python shell, etc. In this specific case, you could run different
Python code, as described in my bug comment.
I think this would be a really valuable feature for python-mode.el.
Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-mode/attachments/20110613/d7150743/attachment.pgp>
More information about the Python-mode
mailing list