A Python IDE idea - looking for input

Neil Hodgson nhodgson at bigpond.net.au
Thu Jan 3 19:48:16 EST 2002


Jeffrey Drake:

> All but one of those ides require payment. PythonWin's debugger likes
> to freeze a lot when developing code. pygame code I believe I was
> debugging. I didn't like any of the other products I tried.

    If you are talking about hard hangs due to UI contention then one way to
go is to run the target code in a separate process and use some probe code
in that process to communicate with the IDE process. I believe most of the
commercial IDEs do this although there are some performance implications. If
the issue is responsiveness of PythonWin then I'm sure more work can be done
to improve this.

   One IDE not mentioned by Steve is Boa Constructor which is very (perhaps
overly) ambitious. It is not that active at the moment as Riaan is busy.
http://boa-constructor.sourceforge.net/

> I am also turned off at using an interpreted bytecode language to
> write an IDE for the same language. My problems with this source from
> java ides which are infamously slow.

   It depends on the level at which you bridge between the low level code
and the high level. If you write lots of detail level code (such as a lexer)
in Python then there may be perfromance concerns but using Python as a
supervisor over low level code written in C works very well.

   Some of the mentioned IDEs use the Scintilla widget I wrote in C++ to
provide text editing. While Python gets hooked into Scintilla text events,
most of the processing is done in C++ leading to acceptable performance I
hope.

   Think through the features you need in an IDE and about how they can be
implemented. The heaviest feature I see is watch points where you need to
evaluate Python expressions after every executed instruction or if you are
clever after every instruction that can change a watch point expression.
This requires running the interpreter over the expression and I would guess
(anyone know?) that this would equal or dominate over the IDE framework code
here, so changing the framework to C would not achieve that much. Maybe watc
hing the instruction counter tick from Python would be slow compared to
doing it from C, but you can always write a small piece of C that performs
the loop and then returns to Python when an interesting event occurs.

   Much of the code bulk in IDEs is UI guff that is better written in
Python.

   Neil





More information about the Python-list mailing list