Open ghost opened 9 years ago
Since we don't want Python consoles to block the main application, we might have to run them on a different thread.
We should be able to do that putthing the console creation in a function and then using something like:
import thread
thread.start_new_thread(function_name, ())
Goal
It would be good to add a module that allows the user to open one or more Python consoles.
Available data
The Python consoles should have access to a Python dictionary defined in the main application. Any modules used by the system can add/edit/remove data from the dictionary.
Given the fact that dictionaries are mutable objects, this means that we will be able to dynamically update what the Python Console has access to.
How to go about it
We should be able to get this done subclassing
InteractiveInterpreter
from the built-incode
module.