Changeset 2910

Show
Ignore:
Timestamp:
12/30/07 16:42:25 (1 year ago)
Author:
vivainio
Message:

Store _ip in user_ns now, instead of builtin. Closes #197 and probably zillion other bugs with embedded ipython instances

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ipython/trunk/IPython/ipapi.py

    r2746 r2910  
    187187 
    188188        self.user_ns = ip.user_ns 
     189        self.user_ns['_ip'] = self 
    189190 
    190191        self.set_crash_handler = ip.set_crash_handler 
  • ipython/trunk/IPython/iplib.py

    r2908 r2910  
    729729        reference to IPython itself.""" 
    730730 
    731         # TODO: deprecate all except _ip; 'jobs' should be installed  
    732         # by an extension and the rest are under _ip, ipalias is redundant 
     731        # TODO: deprecate all of these, they are unsafe 
    733732        builtins_new  = dict(__IPYTHON__ = self, 
    734733             ip_set_hook = self.set_hook,  
     
    737736             ipalias = wrap_deprecated(self.ipalias),   
    738737             ipsystem = wrap_deprecated(self.ipsystem,'_ip.system()'), 
    739              _ip = self.api 
     738             #_ip = self.api 
    740739             ) 
    741740        for biname,bival in builtins_new.items():