[IPython-user] using with emacs
Fernando Perez
fperez.net at gmail.com
Sat Jun 3 18:35:50 CDT 2006
On 6/3/06, Stefan van der Walt <stefan at sun.ac.za> wrote:
> Strange, I believe you also run a fairly recent install of Dapper?
> Krishna's trick breaks IPython on my machine too (and I verified with
> the latest SVN just now).
Yes, I'm running a fully up-to-date dapper here.
I seem to remember you run GNOME, while I use KDE. Try Krishna's
trick inside konsole, and see what happens. I just opened
gnome-terminal, and this is what I get:
longs[~]> echo "" | ipython
Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
Type "copyright", "credits" or "license" for more information.
IPython 0.7.2 -- An enhanced Interactive Python.
? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]:
In [1]:
So it does exit correctly, but the prompts get messed up.
> How can I produce more useful feedback on this problem?
Well, I'm honestly not too sure. This looks like a terminal-related
problem, but those can be very, very tricky to debug.
A few shots into the dark:
- open in emacs a shell with M-x shell, and run ipython there. What
happens? Also, echo $SHELL in there, this is what I get:
longs[ipython]> echo $TERM
dumb
- in ipython, try:
import os;print os.environ['TERM']
as well as in your normal terminal. What's the answer? Any difference
(there shouldn't be)?
- test the echo ""|ipython trick in various terminals. Here are my results:
* konsole, xterm, rxvt: all OK
* gnome-terminal: broken prompts (shown above).
I remember years ago having no end of problems with gnome-terminal and
ipython, so maybe they broke their handling of ANSI escapes again. One
more reason to use KDE ;)
Cheers,
f
More information about the IPython-user
mailing list