From 98f68f55630e718533812bee2eedce13c5c737df 2006-07-27 14:15:54 From: walter.doerwald Date: 2006-07-27 14:15:54 Subject: [PATCH] Fix getglobals() if we're not running under IPython. --- diff --git a/IPython/Extensions/ipipe.py b/IPython/Extensions/ipipe.py index dc2b860..1e4b063 100644 --- a/IPython/Extensions/ipipe.py +++ b/IPython/Extensions/ipipe.py @@ -262,9 +262,10 @@ def item(iterator, index, default=noitem): def getglobals(g): if g is None: if ipapi is not None: - return ipapi.get().user_ns - else: - return globals() + api = ipapi.get() + if api is not None: + return api.user_ns + return globals() return g diff --git a/doc/ChangeLog b/doc/ChangeLog index 3458a67..c8d02c0 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2006-07-27 Walter Doerwald + + * IPython/Extensions/ipipe.py: Fix getglobals() if we're + not running under IPython. + 2006-07-26 Ville Vainio * iplib.py: history now stores multiline input as single @@ -5,7 +10,7 @@ 2006-07-18 Walter Doerwald - * IPython/Extensions/ibrowse.py (ix): Make cursor visible over + * IPython/Extensions/ibrowse.py: Make cursor visible over non existing attributes. 2006-07-14 Walter Doerwald