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

Nicolas Pernetty nicopernetty at yahoo.fr
Fri Jan 19 14:14:29 CST 2007


On Fri, 19 Jan 2007 14:31:13 +0000, Pete Forman
<pete.forman at westerngeco.com> wrote :

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

I did a little digging on the Net, and we already had this issue
before :
http://projects.scipy.org/pipermail/ipython-user/2005-December/002985.html

As it is explained here :
http://lists.gnu.org/archive/html/help-emacs-windows/2005-04/msg00030.html
It seems that you're right and that it's due to ANSI color scheme.
However in the case mentionned, it results in a patch to bash itself.
So maybe here we would have to modify IPython ?

Also for the IPython startup, I made a ipython.cmd as it is explained
here :
http://lists.gnu.org/archive/html/help-emacs-windows/2005-04/msg00020.html
And it works : you don't have to launch IPython from a vanilla Python.
 
> 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
> prompt.
> 
> 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
> (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.
> 
> 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
> 

Right, I ran into it today !
The problem is not related to IPython :
http://mail.python.org/pipermail/python-list/2006-November/412301.html

I'll write to this man to see if he found anything and let you know.

Regards,


More information about the IPython-user mailing list