Emacs + py-mode + tkinter problem

T

Tom Locke

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

And that's all folks. I get precisely one prompt after creating the root,
and then it hangs.

I've had a trawl around and it seems a few have run into this, but so far no
fix.

One tip was try running python with -u, but then I get syntax errors with
anything I type - seems like a CR/LF issue.

Help! :(

Tom.
 
K

Karl =?iso-8859-1?q?Pfl=E4sterer?=

the interactive prompt from a terminal. Since I am quite happy
I would like to konw why you want the python interpreter in emacs?

Because it's much more convenient if you needn't leave the editor.
Editing is also a lot more comfortable.


KP
 
A

Alexander Schmolck

Thomas Güttler said:
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
 
F

Fernando Perez

Alexander Schmolck wrote:

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.

.... me cheers in corner, while I know I've also fallen behind answering people's
recent questions on ipython ;) Ah, real work...

best,

f
 
T

Thomas =?ISO-8859-15?Q?G=FCttler?=

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).

Yes, maybe. I am used to
1. edit with emacs
2. press Alt-TAB
3. in xterm arrowUp return
4. maybe stacktrace --> emacs: goto-line (c-g) goto [1]

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.

Please announce it on python.announce

thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top