[IPython-dev] Re: iPython on Windows
fperez at colorado.edu
Thu Apr 17 18:49:47 CDT 2003
my apologies for the long delay in replying, I'm trying to catch up on email.
By the way, I'm cc-ing the list because now that ipyhton has proper mailing
lists, I'm trying to keep all discussions going on there. You can find links
to the lists at ipython's new home, http://ipython.scipy.org
David LeBlanc wrote:
> What do you think of the idea of making iPython use the python curses
> module on Unixen/Linuxen and PDCurses on the other platforms it supports,
> including Unixen/Linuxen, OS/2 (like that matters anymore ;)) and Windows?
> Thanks to an enquiry on python-dev, I was sent a python wrapper for
> PDCurses 2.4.
> If this is something you're not interested in, what are the prospects of
> creating an IO wrapper for iPython such that all iPython's IO are done via
> this "iPythonIO" class, which could then be twiggled to use it's existing
> scheme or curses or whatever?
Well, I tend to be -1 on the idea of curses support for a simple reason: it
looks complicated, I don't have much time for it, and right now I'm more
looking into integrating IPython with PyCrust (from WxPython) for fancier
features. My view is that ipython will remain a command-line tool, but with
suitable refactoring it should be possible to 'plug' it into PyCrust as its
interpreter shell (and benefit from PyCrust's graphical features).
> If you are in any way amenable to this idea, I would be interested in
> helping out, at least to the extent of getting a curses style IO working on
> Windows using PDCurses (and would hope that you could find room in your
> distro directory for a "wincurses.zip" file).
OTOH, if someone is willing to pitch in the necessary effort and we can have
curses support when in a terminal, GREAT! It's simply more than I can handle
now, but there is a priori no reason why it couldn't be done so that ipython
- as today, in environments lacking curses.
- with fancy multi-line editing and whatnot if curses is available
- optionally plugged into PyCrust for a graphical environment.
Proper modularity of the design is the key to achieve this. I certainly can't
do all that, but I'd more than welcome any efforts from others. I took a long
time to respond to your message, partly because I wanted to settle things over
at ipython's new home, get the mailing lists and bug tracker going, etc. But
now that we have a proper setup it's far easier to coordinate work with other
> WRT the readline issue(s), it could be that iPython either just needs to
> realize that readline is already pre-installed earlier in the python
> loading, or maybe Gonnerman's readline can be dynamically loaded. It might
> also require living with a restricted subset of readline functionality/live
> with his platform defaults. The attached file is his
> site-packages/readline.py, which pyhthon seems to understand it's supposed
> to load on startup of the interpreter by virtue of it's presence in
> site-packages (temporarily renamed to readline.py.save to avoid the
> bouncing iPython problem). A fast look suggests that parse_and_bind being
> no-oped might be a problem for iPython - but OTOH, some of the bindings
> (for history at least) seem to be hard coded into his readline. Looks like
> you need readline.set-completer() too, which is also a no-op. FWIW,
> Gonnerman's readline installs a .pyd that does the keyboard hook and
> reflects all the readline calls etc. back into python (the attached file),
> so I think it would be easy to add these, but that could just be me talking
> out of ignorance. (NB, I renamed readline.py.save to xreadline.py and
> confirmed that it can be dynamically loaded ("import xreadline as
> readline") instead of at startup.)
I'm sure we could work on checking things so that Gonnerman's readline doesn't
crash. Even limited readline support under windows would be a huge boost.
But these are Windows issues, and as I've said before here, my time for
working on Windows is nearly zero. Again, all help/patches from users will be
more than welcome.
I hope you can join in the mailing list and can jump into the ipython effort!
More information about the IPython-dev