[IPython-dev] Brand new refactored version for linux users!
Ville M. Vainio
vivainio at gmail.com
Fri Jan 11 08:46:11 EST 2008
On Jan 11, 2008 3:38 PM, Laurent Dufréchou <laurent.dufrechou at gmail.com> wrote:
> > _ip.create_menu_item('Kill current process", kill_current_process).
> Yeah I see ,interesting, and where does 'kill_current_process' comes from?
> It would have been defined in the ipython instance or it is something
> plugged into the GUI?
It's just a callable that is visible where the create_menu_item is run.
> if you can for example write me a 10 lines
> example of a complete session where you define kill_current_process that I
> could test in ipython shell, I will be able to add it to the GUI.
Suppose that you created a wxapi module that implements this create_menu_item
Add to ipy_user_conf.py:
import wxapi
def sayhi():
print "Hello!"
wxapi.create_menu_item('Do stuff!', sayhi)
Then, when you start wxipython, it will run ipy_user_conf.py when
IPython starts up, and register that menu command.
--
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
More information about the IPython-dev
mailing list