From 3693a2491997b3a97efc4f8e5a1128d7a4b21f13 2007-05-16 20:55:28 From: vivainio Date: 2007-05-16 20:55:28 Subject: [PATCH] some sci profile fixes --- diff --git a/IPython/Release.py b/IPython/Release.py index 06e8380..e463b9a 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 2334 2007-05-10 06:05:24Z fperez $""" +$Id: Release.py 2356 2007-05-16 20:55:28Z vivainio $""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez @@ -22,7 +22,7 @@ name = 'ipython' # because bdist_rpm does not accept dashes (an RPM) convention, and # bdist_deb does not accept underscores (a Debian convention). -revision = '2333M' +revision = '2355' version = '0.8.2.svn.r' + revision.rstrip('M') diff --git a/IPython/UserConfig/ipy_profile_sci.py b/IPython/UserConfig/ipy_profile_sci.py index eecf253..d45cc4f 100644 --- a/IPython/UserConfig/ipy_profile_sci.py +++ b/IPython/UserConfig/ipy_profile_sci.py @@ -1,18 +1,18 @@ -import ipy_defaults -# import ... -# Load Numpy an SciPy by themselves so that 'help' works on them - import IPython.ipapi import ipy_defaults def main(): ip = IPython.ipapi.get() - ip.ex("import scipy") - ip.ex("import numpy") + try: + ip.ex("import scipy") + ip.ex("import numpy") + + ip.ex("from scipy import *") + ip.ex("from numpy import *") + print "SciPy profile successfully loaded." + except ImportError: + print "Unable to start scipy profile, are scipy and numpy installed?" - ip.ex("from scipy import *") - ip.ex("from numpy import *") -if __name__ == "__main__": - main() \ No newline at end of file +main() \ No newline at end of file