Re: [Python-mode] [Bug 450552] Re: python-mode breaks for python 3

2009-10-23 Thread Rustom Mody
On Tue, Oct 20, 2009 at 1:59 PM, Andreas Roehler
andreas.roeh...@online.dewrote:

 Rustom wrote:
  (cmd (format exec(compile(open('%s').read(), '%s', 'exec')) #
  PYTHON-MODE\n filename filename)))
 What puzzles me still is a pure python question -

 do we need this `read()' here, i.e. if a file opened is
 delivered to exec, will it not being read anyway?

 Thanks


See Guido's 2 to 3 doc
http://docs.python.org/dev/3.0/whatsnew/3.0.html#removed-syntax
says stream argument not taken
___
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode


Re: [Python-mode] [Bug 450552] Re: python-mode breaks for python 3

2009-10-23 Thread Rustom Mody
On Fri, Oct 23, 2009 at 12:50 AM, Andreas Roehler
andreas.roeh...@online.de wrote:

 Sorry. Simply tried to catch the execution of your form with edebug.
 The ways I tried, it wasn't called.

Ok -- Here goes

1. Take some trivial python file (say foo.py) in python-mode
A single line

x = 1

will do

[I assume it opens with python-mode as major mode]

2. Set edebug to break function py-execute-file (in my case its line no 1358)

3. From foo.py do C-c ! (py-shell) to start python

4. Go back to foo.py buffer

5. Load using C-c C-c (py-execute-buffer)

Why are 3 and 4 necessary? Dunno -- but they are at least in my case

edebug should be at the breakpoint.

Please tell me if this does not work.

Rustom
___
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode