[Scipy-svn] r4016 - trunk/scipy

scipy-svn at scipy.org scipy-svn at scipy.org
Thu Mar 13 03:38:59 EDT 2008


Author: cdavid
Date: 2008-03-13 02:38:51 -0500 (Thu, 13 Mar 2008)
New Revision: 4016

Modified:
   trunk/scipy/__init__.py
Log:
Put a meaningful message when importing scipy from its source tree.

Modified: trunk/scipy/__init__.py
===================================================================
--- trunk/scipy/__init__.py	2008-03-12 08:57:03 UTC (rev 4015)
+++ trunk/scipy/__init__.py	2008-03-13 07:38:51 UTC (rev 4016)
@@ -45,7 +45,13 @@
 # imported.
 del linalg
 
-from __config__ import show as show_config
+try:
+    from __config__ import show as show_config
+except ImportError, e:
+    msg = """Error importing scipy: you cannot import scipy while
+    being in scipy source directory; please exit the scipy source
+    tree first, and relaunch your python intepreter."""
+    raise ImportError(msg)
 from version import version as __version__
 
 # Load scipy packages, their global_symbols, set up __doc__ string.




More information about the Scipy-svn mailing list