From 5b1712215aac0335db836d5c0a3b09e0b17be147 2005-12-31 23:50:31 From: fperez Date: 2005-12-31 23:50:31 Subject: [PATCH] add .meta namespace for extension writers. --- diff --git a/IPython/Release.py b/IPython/Release.py index db2ca98..749aebc 100644 --- a/IPython/Release.py +++ b/IPython/Release.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Release data for the IPython project. -$Id: Release.py 986 2005-12-31 23:07:31Z fperez $""" +$Id: Release.py 987 2005-12-31 23:50:31Z fperez $""" #***************************************************************************** # Copyright (C) 2001-2005 Fernando Perez @@ -22,9 +22,9 @@ name = 'ipython' # because bdist_rpm does not accept dashes (an RPM) convention, and # bdist_deb does not accept underscores (a Debian convention). -version = '0.7.0.rc5' +version = '0.7.0.rc6' -revision = '$Revision: 986 $' +revision = '$Revision: 987 $' description = "An enhanced interactive Python shell." diff --git a/IPython/iplib.py b/IPython/iplib.py index e2e92f4..43e5993 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -6,7 +6,7 @@ Requires Python 2.1 or newer. This file contains all the classes and helper functions specific to IPython. -$Id: iplib.py 984 2005-12-31 08:40:31Z fperez $ +$Id: iplib.py 987 2005-12-31 23:50:31Z fperez $ """ #***************************************************************************** @@ -297,6 +297,13 @@ class InteractiveShell(object,Magic): # Default name given in compilation of code self.filename = '' + # Make an empty namespace, which extension writers can rely on both + # existing and NEVER being used by ipython itself. This gives them a + # convenient location for storing additional information and state + # their extensions may require, without fear of collisions with other + # ipython names that may develop later. + self.meta = Bunch() + # Create the namespace where the user will operate. user_ns is # normally the only one used, and it is passed to the exec calls as # the locals argument. But we do carry a user_global_ns namespace diff --git a/doc/ChangeLog b/doc/ChangeLog index ffc1d72..7ab8c8f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,10 @@ 2005-12-31 Fernando Perez + * IPython/iplib.py (InteractiveShell.__init__): add .meta + namespace for users and extension writers to hold data in. This + follows the discussion in + http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. + * IPython/completer.py (IPCompleter.complete): small patch to help tab-completion under Emacs, after a suggestion by John Barnard .