[IPython-user] [newbie] Ipython variables in external functions?

Ville M. Vainio vivainio@gmail....
Mon May 7 01:34:06 CDT 2007


On 5/7/07, yardbird <yardbird@nerdshack.com> wrote:

> it can be invoked also from _ip, but when called from an external script it
> won't work (ie, it won't list instances even if they are present). I guess
> this is because of scoping and namespace rules, but I'm still trying to wrap
> my brain around python's scoping rules (I come mainly from C++ and I've just
> started with python).

If by external script you mean a normal python script, you can't
access the namespace of ipython from there because it's in different
process. If you want to access ipython data, you must use normal
python functions, %run etc. in the ipython process.

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'


More information about the IPython-user mailing list