[Tutor] imbedding python into another program?

Jeff Peery jeffpeery at yahoo.com
Thu Jun 2 00:37:38 CEST 2005


ok, thanks! that helps.  I have an application that reads a data file, crunches some numbers, and spits out some graphs.  In addition to this I would also like users to be able to write small python scripts to operate on the data that is available within the program. I suppose this could be accomplished by simply reading a text input and sending off the command to the command module and then returning the result to the user?? Is this feasible? 
 
thanks for the help!
 
Jeff

Danny Yoo <dyoo at hkn.eecs.berkeley.edu> wrote:


On Wed, 1 Jun 2005, Jeff Peery wrote:

> hello, is it possible to add something like the python IDLE into another
> program

Hi Jeff,

Getting IDLE to work within wxPython is technically possible, but probably
a little tricky, since it'll involve getting the GUI event loops to
cooperate.

I believe it is doable --- there's code in the Twisted Python project, for
example, that allows the Tkinter event loop to integrate into Twisted's
event loop. That being said, this might be overkill for what you're
trying to do.



> say if I wanted to simply run scripts from within a wxPython program?
> Could someone point me to the correct reference? thanks.

Hmmm... do you necessarily have to have those scripts run through IDLE
then? What kind of scripts are you trying to run through wxPython?
Would something like the 'commands' module be useful for you?

http://www.python.org/doc/lib/module-commands.html


Best of wishes to you!

_______________________________________________
Tutor maillist - Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050601/2b7f7111/attachment.htm


More information about the Tutor mailing list