Python IDE
|
Just over a year ago, I started learning Python and blogged about my early experiences. I love the power of Python, Gtk+ and Glade for rapid code generation, and find Python the perfect language for the work I'm doing. |
That work is in helping to develop the Orca screen reader. This will allow people who are blind or have low vision, to have access to the GNOME desktop via speech, braille and screen magnification.
One of my frustrations with developing Orca is that we've been using the equivalent of print statements to get debugging information. The amount of information that is output depends of the debug level you've set. For anything that isn't covered by these print statements, you just add in your own extra print statements. This is rather primitive and reminds me of my early days in writing Java code back in 1996 before decent Java debuggers came along.
Why don't we just use NetBeans with it's Python support? The problem is that NetBeans (which is written in Java) is accessible. What we need here is something that isn't accessible so that when things happen in the Python IDE and/or debugger (things like text being displayed), they aren't generating extra accessibility (at-spi) events, which would interfere with the testing of the accessible application that Orca is currently working with.
When we are testing Orca, we either have to send all of our debug output
to a file, or run Orca in something that isn't accessible (like
xterm) and
use the script command to capture a transcript of what's been
output.
I therefore needed an inaccessible Python IDE/Debugger. I googled for Python IDE and eric3 was the top hit. As it's written in Python and uses Qt, which is currently not accessible using at-spi -- although that's been worked on -- it was perfect.
As Solaris now automatically comes with JDS/GNOME, setting up a Qt development environment and all the other dependancies that eric3 needs wasn't a slam dunk, but it wasn't all that hard. I've included my notes below in case there is anybody else who is interested in doing this.
When I first started up eric3, and saw all the grey blank icons,
I was convinced I'd done something wrong and that the application wasn't
finding the location where all the icon glyphs were stored. After starting
to look at the eric3
tutorials,
I can see that
this look is perfectly okay and is to be
expected,
the gray presumably indicating currently
unavailable insensitive options.
I'm now at the point where I'm going to work through the eric3tutorials and see if this is going to work nicely with debugging Orca. I'll probably have more to report in a few days time.
Notes.
- Qt:
Downloaded a compressed tarball of the binary packages for Solaris 10 (x86) from:
ftp://ftp.sunfreeware.com/pub/freeware/intel/10/qt-3.3.4-sol10-intel-local.gz
Saved under
/export/home/richb/python/IDEUnpacked with:
% cd /export/home/richb/python/IDE % gunzip qt-3.3.4-sol10-intel-local.gzInstalled (as root) with:
# cd /export/home/richb/python/IDE # pkgadd -d qt-3.3.4-sol10-intel-local allAfter installation, I set the following:
% setenv QTDIR /usr/local/qt % setenv PATH $QTDIR/bin:$PATH % setenv MANPATH $QTDIR/doc/man:$MANPATH % setenv LD_LIBRARY_PATH $QTDIR/lib:$LD_LIBRARY_PATH - HACK: Needed to create a bogus link for
libstdc++.so.5in order to get PyQt to configure.# cd /usr/sfw/lib # ln -s libstdc++.so.6.0.3 libstdc++.so.5 - QScintilla:
Home page:
http://www.riverbankcomputing.co.uk/qscintilla/index.php
Downloaded a compressed tarball from:
http://www.riverbankcomputing.com/Downloads/QScintilla1/qscintilla-1.65-gpl-1.6.tar.gz
Unpacked under:
/export/home/richb/python/IDE/qscintilla-1.65-gpl-1.6Configured and built and installed QScintilla (as root) with:
# cd /export/home/richb/python/IDE/qscintilla-1.65-gpl-1.6/qt # qmake qscintilla.pro (Note that this outputs: "QGDict::hashKeyString: Invalid null key" which it seems is okay to ignore. Famous last words.) # make # make install - SIP:
Home page:
http://www.riverbankcomputing.co.uk/sip/download.php
Downloaded a compressed tarball from:
http://www.riverbankcomputing.com/Downloads/sip4/sip-4.4.5.tar.gz
Unpacked under:
/export/home/richb/python/IDE/sip-4.4.5Configured and built SIP with:
% cd /export/home/richb/python/IDE/sip-4.4.5 % python configure.py % makeInstalled (as root) with:
# cd /export/home/richb/python/IDE/sip-4.4.5 # make install - PyQt:
Home Page:
http://www.riverbankcomputing.co.uk/pyqt/
Downloaded PyQt from:
http://www.riverbankcomputing.com/Downloads/PyQt3/GPL/PyQt-x11-gpl-3.16.tar.gz
Unpacked under:
/export/home/richb/python/IDE/PyQt-x11-gpl-3.16Configured and built PyQt with:
% cd /export/home/richb/python/IDE/PyQt-x11-gpl-3.16 % python configure.py % makeInstalled (as root) with:
# cd /export/home/richb/python/IDE/PyQt-x11-gpl-3.16 # make install - eric3:
Home page:
http://www.die-offenbachs.de/detlev/eric3.html
Downloaded a compressed tarball from:
http://superb-west.dl.sourceforge.net/sourceforge/eric-ide/eric-3.9.1.tar.gz
Unpacked under:
/export/home/richb/python/IDE/eric-3.9.1Installed eric3 (as root) with:
# cd /export/home/richb/python/IDE/eric-3.9.1 # python install.pyStarted eric3 with:
% python /usr/lib/python2.4/site-packages/eric3/eric3.pyTutorials for eric3 at:
[Technorati Tag: Accessibility]
( Jul 12 2006, 01:19:37 PM PDT ) [Listen] Permalink Comments [6]
Comments are closed for this entry.













Posted by Jason McVetta on July 12, 2006 at 03:26 PM PDT #
Posted by nate on July 12, 2006 at 03:55 PM PDT #
Try again..
It seems to me that most python IDEs end up going closed source. One that has lots of neat features that remains Free is SPE or Stan's Python Editor.
One fancy thing that it does is that it integrates into Blender.. Great for modelling using python or making blender games, but obviously not much help for the desktop. :P
From their website:
"Spe is a free python IDE with auto indentation & completion, call tips, syntax coloring & highlighting, UML diagrams, class explorer, source index, auto todo list, sticky notes, pycrust shell, file browsers, drag&drop, context help, Blender support, ... Spe ships with Python debugger (remote & encrypted), wxGlade (gui designer), PyChecker (source code doctor) and Kiki (regex console)."
So maybe you'd find that interesting. I'm using Debian and it's aviable via apt-get, at least in unstable.
Posted by nate on July 12, 2006 at 03:59 PM PDT #
Posted by Eddy Mulyono on July 12, 2006 at 09:39 PM PDT #
Posted by Wikier on July 13, 2006 at 08:58 AM PDT #
Thanks for all the comments. Isn't Eclipse written in Java, and therefore I would have the same problem as with NetBeans? Or is it not accessible? If so, then that might work.
There are probably several choices I could make for a Python IDE here. Thanks for the alternative suggestions. I'll start with eric3, then see how I find it deficient.
Thanks also for the pointer to the Bay Area Python Interest Group. I do live just one city over from Mountain View, but unfortunately have other plans for tonight.
Posted by Rich Burridge on July 13, 2006 at 09:18 AM PDT #