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

Pete Forman pete.forman at westerngeco.com
Fri Jan 19 08:31:13 CST 2007

Nicolas Pernetty <nicopernetty at yahoo.fr> writes:

 > I would like to give it a shot, but I'm not familiar with comint...
 > Could someone at least point me to the right direction or what is
 > the procedure to debug this ?

Thanks for the offer.  I've not found much time to work on it myself.

The ^A and ^B are inserted by ColorANSI.py and assume that readline is
involved.  A ColorScheme without them is needed.  As an intermin
measure I hacked ansi-color.el to consume the extra codes.
Alternatively NoColor can be specified.

The threading is liable to hang one way or another.  Here is a session
within py-shell.  Extra comments are marked ///.  Up till [7] the
behavior under XEmacs is the same as starting ipython from a DOS

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 sys
>>> sys.argv = ['', '-colors', 'NoColor', '-pylab']
>>> import IPython
>>> IPython.Shell.start().mainloop()
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
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.

In [1]: import pylab

In [2]: import scipy

In [3]: x = scipy.array(range(500))

In [4]: y = scipy.sqrt(x)

In [5]: pylab.plot(x, y)
Out[5]: [<matplotlib.lines.Line2D instance at 0x00E85418>]

In [6]: pylab.show()
/// plot displays and can be zoomed, etc.
/// need to close the plot to get the python console control back

In [7]: pylab.plot(x, y/2)
Out[7]: [<matplotlib.lines.Line2D instance at 0x01081710>]
/// display starts up okay again but is unresponsive

In [8]: y.max()
Out[8]: 22.3383079037

In [9]:
/// used Windows to kill the plot window
Process Python unknown signal

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