Hassan Aurag wrote:
> 
> I have been wanting something like this for GmatH for a while now!
> 
You may want to see entry #5.8 of the Python FAQ.
  => http://www.python.org/doc/FAQ.html#5.8

My starting point was James Henstridge's gtkcons.py in the 
examples/ide directory of pygtk distribution.

> Do you have any idea how you can create a canvas on which cells  would 
> appear successively. One for input, then one for output, then one for 
> input and so on? And still have it work like the Interactive 
> interpreter attached!
>
> This would mean a nice  Interactive Interpreter a la Mathematica, and 
> attaching dynamically file_descriptors associated with those cells to 
> sys.stdin and sys.stdout!
> 
Never used Mathematica, so probably I didn't get the whole idea.

Anyway, here is a quick script featuring a stock of (say) ten 
interpreters using GtkEntr(ies) and a GtkTable, hoping to give you 
an hint.

The main point is that there can exist only one sys.stdout, so to
use several output "devices" you must reassign to sys.stdout before 
each code execution.

As for Gtk widgets, gnumeric uses GnomeCanvas, but I haven't studied
it yet.

Ciao!

-- Mirko Nasato

multi.py.gz

Reply via email to