embedding an interactive console

P

Paul Miller

I did this YEARS ago with Python 1.5, and I recall it being slightly
painful. I have an embedded Python interpreter and I want to provide an
interactive console (implemented in my GUI application with a Qt
TextEdit widget). I can handle the GUI part of it, but I'm wondering
what the latest Python method of implementing this is.

I note the documentation for InteractiveConsole, which is implemented in
Python. Is there any example code for using this from within C/C++ code
to emulate the command-line interpreter inside a GUI app?
 
P

Paul Miller

Paul said:
I note the documentation for InteractiveConsole, which is implemented in
Python. Is there any example code for using this from within C/C++ code
to emulate the command-line interpreter inside a GUI app?

I've gotten my text edit widget to send InteractiveConsole strings to
run and can see the results.

But I'm not getting a >>> prompt consistently.

I'd love to see some sample code from anyone who is using this with an
embedded interpreter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top