> On Tue, 26 Feb 2002, Graham Ashton wrote:
> > Have you seen the stuff in the pygtk/examples/ide directory in the
source?
>
> On Tue, 26 Feb 2002, Michael Benfield wrote:
>
> > I've never used IDLE, but if you're just after a PyGtk window where you
> > can type Python commands, that's not too hard. In fact, I've got a
> > tidbit of code that does just that. See
> > <www.duckbrain.com/interpreter.py>.
>
> Hmmm, the solutions presented all use eval/exec type mechanisms.
> Consequently, they don't deal well with multi-line statements.
>
> However, I did get many good ideas from the code.  Once I get a clean
> program in place which uses the Python InteractiveInterpreter, I'll repost
> it as an example.
>
> Thanks for all the help,
> -a
>

I once wrote something similar to this (see
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109)
which correctly handles multi-line code (Using the code module)

This was actually in order to create and manipulate GTK windows etc
from a command prompt, without having to call mainloop() to see/test it,
so it still just uses the normal command prompt.  It shouldn't be too hard
to remove the relevant parts and combine with the above however.

Brian.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to