Emacs + py-mode + tkinter problem

Alexander Schmolck a.schmolck at gmx.net
Thu Jul 3 17:02:01 EDT 2003


Thomas Güttler <guettler at thomas-guettler.de> writes:

> Tom Locke wrote:
> 
> > Hi All,
> > 
> > I'm having trouble with the python shell within emacs. It's hanging when I
> > use tkinter. Setup is:
> > 
> > Windows XP
> > emacs 21.3
> > py-mode 4.6
> > 
> > Recipe:
> > From a python-mode buffer, launch the python shell (C-c !), then in the
> > shell
> 
> Sorry, I don't know an answer since I only start
> the interactive prompt from a terminal. Since I am quite happy
> I would like to konw why you want the python interpreter in emacs?
> 

While I can't speak for the OP, how about:

- uhm, how do you get code into your interactive session? In python mode you
  can run selected code on a keypress (even if its indentation doesn't start
  at 0), whereas last time I looked, cut and pasting of multiline code didn't
  work *at all* for a stand-alone python shell (because the interactive python
  shell insists on extra newlines after statements)

- debugger integration like automatically landing in the offending source code
  on exceptions and being able to walk through the code corresponding to the
  traceback (try C-c -)

- to use a real editor, not just for editing code but in the interactive
  session, too (instead of the crippled readline interface). Ever tried
  comint-previous-matching-input-from-input on M-p? Better than cursor-up, no?
  Isearching your output can also be quite useful (and M-z etc. also happen to
  work, because you're using emacs, not something that feels a bit like it).

Maybe too many people are happy with too little (essentially
edit/run-whole-program/debug cycles a la C, plus maybe using python
interactively as a calculator or to look up documenation). If I had time I'd
write a tutorial on using ipython from within emacs for (I think) much more
effective interactive development. As it is I still haven't found the time for
a reply to a post by David Abrahams on the topic.

'as





More information about the Python-list mailing list