[IPython-user] pysh variable substituion and scope

Ville Vainio vivainio at gmail.com
Wed Jun 7 07:08:42 CDT 2006

On 6/5/06, Fernando Perez <fperez.net at gmail.com> wrote:

> whatever), and add your modifications there.  You can monkeypatch the
> ipython object to inject your enhanced ipsystem() method, as well as
> doing anything else you want to propose.

Or less drastically, reassign _ip.system to point to a homebrewed
system invocation with stack frame traversal etc. :

[~\_ipython]|42> ip = IPython.ipapi.get()
[~\_ipython]|43> def f(*args): print "hi",args
[~\_ipython]|44> ip.system = f
[~\_ipython]|45> ls
hi ('ls.exe ',)

If you (Krishna) can provide a patch that does this in
ipy_profile_sh.py, it would be great.

Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'

More information about the IPython-user mailing list