[Python-mode] [Bug 450552] Re: python-mode breaks for python 3
Rustom Mody
rustompmody at gmail.com
Thu Oct 22 16:25:29 CEST 2009
On Thu, Oct 22, 2009 at 5:43 PM, Andreas Roehler
<andreas.roehler at online.de>wrote:
> Rustom Mody wrote:
> > On Tue, Oct 20, 2009 at 1:59 PM, Andreas Roehler
> > <andreas.roehler at online.de <mailto:andreas.roehler at online.de>> wrote:
> >
> > Rustom wrote:
> > > (cmd (format "exec(compile(open('%s').read(), '%s', 'exec')) #
> > > PYTHON-MODE\n" filename filename)))
>
> For me both of your variants are working, see output of checks below.
>
> You probably need to try on windows.
See
http://bugs.python.org/issue5524
> uname -a && python --version && cat 2+4.py && cat exec-read.py && python
> exec-read.py &&
> cat exec-compile-read.py && python
> exec-compile-read.py
>
> ==>
>
> Linux ... 2.6.22.19-0.2-default #1 SMP 2008-12-18 10:17:03 +0100 i686
> athlon i386 GNU/Linux
> Python 2.5.1
> #! /usr/bin/env python
> # -*- coding: utf-8 -*-
>
> print 2 + 4
> ##################
> #! /usr/bin/env python
> # -*- coding: utf-8 -*-
>
> exec(open('2+4.py').read())
> ######################
>
> 6
> #! /usr/bin/env python
> # -*- coding: utf-8 -*-
>
> exec(compile(open('2+4.py').read(), '2+4.py', 'exec'))
> #################
>
> 6
>
>
> ;;;;;;;;;;;;;;;;;
>
> BTW can you tell whats the us of `compile' here for you?
>
> See
http://stackoverflow.com/questions/436198/what-is-an-alternative-to-execfile-in-python-3-0
> Do you have some tests for python-mode.el?
>
As in automated el/py etc? No
As in biological? ...
Heres yours truly :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-mode/attachments/20091022/59ee20c7/attachment.htm>
More information about the Python-mode
mailing list