diff --git a/IPython/path.py b/IPython/Extensions/path.py similarity index 100% rename from IPython/path.py rename to IPython/Extensions/path.py diff --git a/IPython/__init__.py b/IPython/__init__.py index 1193867..10b64bc 100644 --- a/IPython/__init__.py +++ b/IPython/__init__.py @@ -27,7 +27,7 @@ IPython tries to: IPython requires Python 2.2 or newer. -$Id: __init__.py 1099 2006-01-29 21:05:57Z vivainio $""" +$Id: __init__.py 1110 2006-01-30 20:43:30Z vivainio $""" #***************************************************************************** # Copyright (C) 2001-2004 Fernando Perez. @@ -38,14 +38,21 @@ $Id: __init__.py 1099 2006-01-29 21:05:57Z vivainio $""" # Enforce proper version requirements import sys + if sys.version[0:3] < '2.3': raise ImportError, 'Python Version 2.3 or above is required.' + +# Make it easy to import extensions - they are always directly on pythonpath. +# Therefore, non-IPython modules can be added to Extensions directory + +import os +sys.path.append(os.path.dirname(__file__) + "/Extensions") # Define what gets imported with a 'from IPython import *' __all__ = ['deep_reload','genutils','ipstruct','ultraTB','DPyGetOpt', 'Itpl','hooks','ConfigLoader','OutputTrap','Release','Shell', 'platutils','platutils_win32','platutils_posix','platutils_dummy', - 'ipapi','path','rlineimpl'] + 'ipapi','rlineimpl'] # Load __all__ in IPython namespace so that a simple 'import IPython' gives # access to them via IPython. diff --git a/IPython/genutils.py b/IPython/genutils.py index ecd1aaf..b96b327 100644 --- a/IPython/genutils.py +++ b/IPython/genutils.py @@ -5,7 +5,7 @@ General purpose utilities. This is a grab-bag of stuff I find useful in most programs I write. Some of these things are also convenient when working at the command line. -$Id: genutils.py 1100 2006-01-29 21:27:16Z vivainio $""" +$Id: genutils.py 1110 2006-01-30 20:43:30Z vivainio $""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez. @@ -36,7 +36,7 @@ import types # Other IPython utilities from IPython.Itpl import Itpl,itpl,printpl from IPython import DPyGetOpt -from IPython.path import path +from path import path if os.name == "nt": from IPython.winconsole import get_console_size diff --git a/doc/ChangeLog b/doc/ChangeLog index 4389f6d..20fde3f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -12,6 +12,10 @@ * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. * aliases can now be %store'd + + * path.py move to Extensions so that pickleshare does not need + IPython-specific import. Extensions added to pythonpath right + at __init__. 2006-01-29 Fernando Perez