Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > integrating embedded interpreter with external controls

Reply
Thread Tools

integrating embedded interpreter with external controls

 
 
joshusdog@gmail.com
Guest
Posts: n/a
 
      05-07-2007
I need some advice about how to go about architecting a solution to
the following problem.

I'd like to create an application that has an interactive listener/
console window in which the user can enter commands (in much the same
vain as 3D Studio Max, for those who are familiar with the product).
The console would essentially be an embedded Python interpreter
running the interactive loop (a call to the C API's
PyRun_InteractiveLoop()).

I'd also like buttons and other UI controls to be able to access
functions and objects that are defined through the console. I'm not
really sure how to integrate the UI controls with the console though,
especially if the console is running PyRun_InteractiveLoop(), which is
a tight loop.

I'm guessing that the solution will most likely require the console to
run in a separate thread, but I still don't know how to get the UI to
interact with the console.

Does anyone have any helpful suggestions?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python embedded interpreter: how to initialize the interpreter ? ycollet@freesurf.fr Python 3 01-03-2007 01:00 AM
Embedded Python interpreter, runtime libs, and crashing Peter Newman Python 1 10-26-2005 03:38 AM
embedded python and interpreter threads Charlie DeTar Python 2 12-07-2004 04:52 PM
Threads in embedded interpreter doesn't run devrim.erdem@gmail.com Python 3 10-21-2004 07:27 PM
Grabbing stdout From Embedded Interpreter Tim Stanka Python 0 07-19-2004 03:00 PM



Advertisments