[IPython-User] IPython included in Spyder v1.1.0

Pierre Raybaut pierre.raybaut@gmail....
Wed Jun 16 16:10:56 CDT 2010


Hi all,

Spyder (Scientific PYthon Development EnviRonment) is a free open-source
Python development environment providing MATLAB-like features in a simple
and light-weighted software, available for Windows XP/Vista/7, GNU/Linux and
MacOS X:
   * advanced code editing features (code analysis, ...)
   * interactive console with MATLAB-like workpace (with GUI-based list,
dictionary, tuple, text and array editors -- screenshots:
http://packages.python.org/spyder/console.html#the-workspace) and integrated
matplotlib figures
   * external console to open an interpreter or run a script in a separate
process (with a global variable explorer providing the same features as the
interactive console's workspace)
   * code analysis with pyflakes and pylint
   * search in files features
   * documentation viewer: automatically retrieves docstrings or source code
of the function/class called in the interactive/external console
   * integrated file/directories explorer
   * MATLAB-like path management
   ...and more!

Since v1.1.0 (which has recently reached Release Candidate 1), IPython has
been integrated in the external console.
See here: http://spyderlib.googlegroups.com/web/ipython.png<http://www.google.com/url?sa=D&q=http://spyderlib.googlegroups.com/web/ipython.png&usg=AFQjCNGOFIGIa7tvD7Y6bMdy7WvlrM5dOA>
and there: http://spyderlib.googlegroups.com/web/spyder_light.png<http://www.google.com/url?sa=D&q=http://spyderlib.googlegroups.com/web/spyder_light.png&usg=AFQjCNHgOMnWP66VaxvD7vq86lUwH0Gglg>
That is great news (and I hope that you will be excited by these
screenshots), and following this, Spyder v2.0 should be almost completely
based on IPython.

However, I still have some difficulties with IPython and I would really
appreciate some help to fix these bugs.
First of all, let me explain how it works. It's quite simple actually: I'm
opening a Python interpreter in another process (QProcess) and this
interpreter executes a startup script which is here:
http://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/externalshell/startup.py
Now you can see that on Windows platforms, I'm forced to do ugly things to:
1. fix the encoding which is not properly detected by Python in the QProcess
(I assume that it's a Python bug on Windows) and cause errors in pyreadline
2. change the sys.platform to anything but 'win32' to prevent IPython from
doing this: (in IPython.genutils):
if sys.platform == 'win32' and readline.have_readline:
    Term = IOTerm(cout=readline._outputfile,cerr=readline._outputfile)
3. add an environment variable (to the QProcess): TERM=emacs, to prevent
IPython from using msvcrt for the 'page_more' function implementation
because like emacs, Spyder doesn't like to be bypassed with msvcrt.getch()
(see IPython.genutils.page_more definitions)

Worse, I found a very strange bug happening when opening a PyQt file dialog
(QFileDialog.xxx) from a mainwindow -- e.g. when using the "save figure"
feature in a matplotlib figure: the GUI window freezes and switching back to
the IPython console and pressing Enter will unblock it! This bug only
happens in a IPython session launched into a Python interpreter running in a
separate process (it does not happen in a simple Python interpreter running
in a separate process).

Any help would be really appreciated!
Thanks,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20100616/28aaf61a/attachment.html 


More information about the IPython-User mailing list