Most likely you know AutoCAD. Well, I have to write a program like AutoCAD 
that should have:

- a graphical area (created with PyGTK)
- a text-based command line

The user enters some text command on the CL, the command get executed by the 
embedded Python interpreter and the (graphical) results get displayed on the 
graphical area.

So, I wonder:

- How can I embed a Python interpreter into a PyGTK application? Do I have to 
have a separated process for the embedded interpreter or I have to use the 
existing PyGTK Python interpreter? (I would like to have a separated process, 
if I had to choose).

- Is there any viable "PyCLIWidget" I can use as the PyGTK CL window for my 
app?

- How can I communicate with my embedded interpreter? Just use its 
STDIN/STDOUT pseudo-files? Or use IPC, maybe via TCP/IP sockets?

- How can I make accessible my PyGTK variables/functions/objects to my 
embedded interpreter? Just load the existing PyGTK modules and call the 
wished functions? What if the embedded interpreter and the PyGTK engine are 
separated Python process? How can they share the same environment?

- How can I keep my embedded interpreter "waiting for commands"? Can I use a 
text stream as input (I mean: a live STDIN pseudo-file, instead of a static 
file)? I would like to have something like the mod_python of Apache.

Many thanks in advance for your help.

----------------------------------
Alessandro Bottoni
[EMAIL PROTECTED]
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to