[IPython-user] IPython in XEmacs now working on Windows

Pete Forman pete.forman at westerngeco.com
Fri Dec 29 11:05:34 CST 2006


I'm trying to get IPython 0.7.3 working with XEmacs 21.5.17 native on
XP SP2, Python 2.5, python-mode.el 4.79.  When I start py-shell I get
startup messages but no prompt.

Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 0.7.3 -- 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.


Some things will produce output, including the colored Out[n]:
prefix.  At the moment "7*5" produces "Out[22]: 35" for example but
"print 7*5" does nothing.  It seems that after a certain amount of
stuff has built up that I get a slightly garbled version of the In[n]:
lines that I'd been expecting.

Vanilla python-mode works fine if I do not (require `ipython) first.

ansi-color.el works okay in shell-mode, "ls --color-yes" does a
directory listing in different colors.

ipython works from a Windows command prompt outside of emacs.


The furthest I've got is to avoid ipython.el and to start IPython from
the vanilla py-shell.  ansi-color-for-comint-mode-on was called first.

Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import IPython
>>> IPython.Shell.IPShell().mainloop(1)
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 0.7.3 -- 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.

^A^BIn [^A^B1^A^B]: ^A^B2
Out[1]: 2

^A^BIn [^A^B2^A^B]: ^A^Bprint 3*4
12

^A^BIn [^A^B3^A^B]: ^A^Bfor i in range(4):
^A^B   ...: ^A^B    print i
^A^B   ...: ^A^B
0
1
2
3

The In and Out prefixes are in the correct green and red colors but
there are extra Ctl-A and Ctl-B control characters mixed in with the
In prefixes.
-- 
Pete Forman                -./\.-  Disclaimer: This post is originated
WesternGeco                  -./\.-   by myself and does not represent
pete.forman at westerngeco.com    -./\.-   the opinion of Schlumberger or
http://petef.port5.com           -./\.-   WesternGeco.



More information about the IPython-user mailing list