Tuesday, February 07, 2006

Lightning 1.3: yet, one more!

I was reading a post on comp.lang.python and thought:
Wouldn't it be nice to see to try to import this module and use dir() and help() to find out ...
Then I realised that it would be silly to use Lightning Compiler :-) to do so; this was clearly a task better left for the interpreter. Then it dawned on me...

Version 1.3 is out. I changed the layout to use a wxNotebook, with the first page being the same Python Editor as before, and the second page is an embedded Python Interpreter, for those rare occasions when you just need it. All this, under 20kb (of course, using wxPython to do the heavy work), and it still loads in less than a second on my computer.

Of course, for the really heavy work, I still use SPE...

P.S. Remember that the Editor handles input() and raw_input() much better than the Interpreter does! ;-)

3 comments:

Tim Golden said...

Of course, the interpreter window offers auto-completion (or whatever that thing's called when you type sys. and it pops up with all the options). But I generally find that a mixed blessing, so I'm not sure if I'd actually want it in the editor.

André said...

Just to reassure you: auto-completion is not going to be included in the editor. I want the editor to be a handy tool for quick testing purpose. Something complementary to the basic interpreter, but not more than that. My objective: keep the whole thing (including comments and blank lines) under 500 lines.

Tim Golden said...

Slight corollary to this discussion on autocompletion in interpreter but not in editor... At the mo', copying a chunk of text from one to the other is a little hazard-prone: it sometimes seems to go wrong in slightly funny ways. I'm not sure just how much effort it's worth, but if it were possible to cut-and-paste to-and-fro, that might be useful. BTW it's really easy to run different lightnings at one time and cut-and-paste between them, which *is* useful and just as easy as the multi-tabs I had thought about at one point. (Sorry, I'm used to SQL Server's Query Analyzer which is a useful tool as far as it goes).

TJG