ipy_profile_scipy.py
25 lines
| 468 B
| text/x-python
|
PythonLexer
vivainio
|
r680 | """ IPython 'sci' profile | ||
Replaces the old scipy profile. | ||||
""" | ||||
import IPython.ipapi | ||||
import ipy_defaults | ||||
def main(): | ||||
ip = IPython.ipapi.get() | ||||
try: | ||||
ip.ex("import numpy") | ||||
fperez
|
r763 | ip.ex("import scipy") | ||
vivainio
|
r680 | |||
ip.ex("from numpy import *") | ||||
fperez
|
r763 | ip.ex("from scipy import *") | ||
vivainio
|
r680 | print "SciPy profile successfully loaded." | ||
except ImportError: | ||||
print "Unable to start scipy profile, are scipy and numpy installed?" | ||||
fperez
|
r763 | main() | ||