I have a GUI based application (TraitsUI / PyQt / Envisage) written in Python. I would like to create an IPython Notebook in which I show a small API and a few objects. These objects include a SQLAlchemy session and a bunch of SQLAlchemy models.
I watched a lot, but I can not find examples of this. I can start the laptop:
from IPython.frontend.html.notebook import notebookapp app = notebookapp.NotebookApp.instance() app.initialize() app.start()
and this works quite well (although I would prefer the "start" to be non-blocking ... I assume I can do this in a different thread if necessary), but I cannot change the namespace.
I also found such examples:
from IPython.zmq.ipkernel import IPKernelApp namespace = dict(z=1010) kapp = IPKernelApp.instance() kapp.initialize()
But I'm not sure how to actually open a laptop here.
Does anyone have any suggestions?
Thanks!
source share