From 0217ba383effff3bf3eab23f8df40fd1472d879e 2006-12-12 18:50:20 From: vivainio Date: 2006-12-12 18:50:20 Subject: [PATCH] david cournapeau patch from ticket \#107 (import_some fix). doc changes --- diff --git a/IPython/UserConfig/ipy_user_conf.py b/IPython/UserConfig/ipy_user_conf.py index df8dbfd..7910beb 100644 --- a/IPython/UserConfig/ipy_user_conf.py +++ b/IPython/UserConfig/ipy_user_conf.py @@ -12,6 +12,8 @@ Note that as such this file does nothing, for backwards compatibility. Consult e.g. file 'ipy_profile_sh.py' for an example of the things you can do here. +See http://ipython.scipy.org/moin/IpythonExtensionApi for detailed +description on what you could do here. """ # Most of your config files and extensions will probably start with this import diff --git a/IPython/UserConfig/ipythonrc b/IPython/UserConfig/ipythonrc index 36b8cc6..0764828 100644 --- a/IPython/UserConfig/ipythonrc +++ b/IPython/UserConfig/ipythonrc @@ -1,10 +1,17 @@ # -*- Mode: Shell-Script -*- Not really, but shows comments correctly -# $Id: ipythonrc 1879 2006-11-04 00:34:34Z fptest $ +# $Id: ipythonrc 1979 2006-12-12 18:50:20Z vivainio $ #*************************************************************************** # # Configuration file for IPython -- ipythonrc format # +# =========================================================== +# Deprecation note: you should look into modifying ipy_user_conf.py (located +# in ~/.ipython or ~/_ipython, depending on your platform) instead, it's a +# more flexible and robust (and better supported!) configuration +# method. +# =========================================================== +# # The format of this file is simply one of 'key value' lines. # Lines containing only whitespace at the beginning and then a # are ignored # as comments. But comments can NOT be put on lines with data. diff --git a/IPython/ipmaker.py b/IPython/ipmaker.py index 364268c..9d886f5 100644 --- a/IPython/ipmaker.py +++ b/IPython/ipmaker.py @@ -6,7 +6,7 @@ Requires Python 2.1 or better. This file contains the main make_IPython() starter function. -$Id: ipmaker.py 1879 2006-11-04 00:34:34Z fptest $""" +$Id: ipmaker.py 1979 2006-12-12 18:50:20Z vivainio $""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez. @@ -576,13 +576,13 @@ object? -> Details about 'object'. ?object also works, ?? prints more. import_fail_info(mod) for mod_fn in IP_rc.import_some: - if mod_fn == []: break - mod,fn = mod_fn[0],','.join(mod_fn[1:]) - try: - exec 'from '+mod+' import '+fn in IP.user_ns - except : - IP.InteractiveTB() - import_fail_info(mod,fn) + if not mod_fn == []: + mod,fn = mod_fn[0],','.join(mod_fn[1:]) + try: + exec 'from '+mod+' import '+fn in IP.user_ns + except : + IP.InteractiveTB() + import_fail_info(mod,fn) for mod in IP_rc.import_all: try: diff --git a/doc/ChangeLog b/doc/ChangeLog index 663084d..655efec 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,13 @@ +2006-12-12 Ville Vainio + + * ipmaker.py: apply david cournapeau's patch to make + import_some work properly even when ipythonrc does + import_some on empty list (it was an old bug!). + + * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc: + Add deprecation note to ipythonrc and a url to wiki + in ipy_user_conf.py + 2006-12-08 Ville Vainio * Extensions/ipy_stock_completers.py.py: fix cd completer