[IPython-dev] embedding ipython
Sun Apr 25 13:29:35 CDT 2010
I have been using an embedded IPython shell (sorry I am still at 0.9.1) in a
wxPython app for quite some time and I (and my users) like very much.
I cloned IPython.gui.wx.ipython_view to customize look-and-feel with the
rest of my app.
My app has a bunch of "GUI" tabs that control physics experiment hardware
(neutron scattering at Oak Ridge National Lab) and one tab that is the
IPython shell that allows for "custom" scripts. The main app needs to "pass"
some objects into the shell, for example an object that is responsible for
communication with the control hardware,
so it can be used in the interactive shell. I used user_ns dictionary for it
and it works for me.
Now I have a bunch of questions, so please bear with me:
a) what is the difference between user_ns and user_global_ns (in particular
b) the example (wxIPython) as well I my embedded shell do not fill _oh
dictionary and '_' is always empty so users cannot "recall" the results of
the previous statement. The ipython shell works fine in that respect. Why
wxIPython does not?
c) could "passing" of the objects be done via 'configuration' file? If yes,
d) could an external app execute a script (function) via IPython shell?
e) some users suggested a capability where user "queues" scripts and then
some kernel executes them one-by-one. Anybody knows a good python solution
Thanks for your patience :)
Any help, directions, etc greatly appreciated
Piotr Adam Zolnierczuk
written on recycled electrons
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev