##// END OF EJS Templates
Fix sympy profile to work with sympy 0.7....
Jens Hedegaard Nielsen -
Show More
@@ -1,30 +1,30 b''
1 c = get_config()
1 c = get_config()
2 app = c.InteractiveShellApp
2 app = c.InteractiveShellApp
3
3
4 # This can be used at any point in a config file to load a sub config
4 # This can be used at any point in a config file to load a sub config
5 # and merge it into the current one.
5 # and merge it into the current one.
6 load_subconfig('ipython_config.py', profile='default')
6 load_subconfig('ipython_config.py', profile='default')
7
7
8 lines = """
8 lines = """
9 from __future__ import division
9 from __future__ import division
10 from sympy import *
10 from sympy import *
11 x, y, z = symbols('xyz')
11 x, y, z = symbols('x,y,z')
12 k, m, n = symbols('kmn', integer=True)
12 k, m, n = symbols('k,m,n', integer=True)
13 f, g, h = map(Function, 'fgh')
13 f, g, h = map(Function, 'fgh')
14 """
14 """
15
15
16 # You have to make sure that attributes that are containers already
16 # You have to make sure that attributes that are containers already
17 # exist before using them. Simple assigning a new list will override
17 # exist before using them. Simple assigning a new list will override
18 # all previous values.
18 # all previous values.
19
19
20 if hasattr(app, 'exec_lines'):
20 if hasattr(app, 'exec_lines'):
21 app.exec_lines.append(lines)
21 app.exec_lines.append(lines)
22 else:
22 else:
23 app.exec_lines = [lines]
23 app.exec_lines = [lines]
24
24
25 # Load the sympy_printing extension to enable nice printing of sympy expr's.
25 # Load the sympy_printing extension to enable nice printing of sympy expr's.
26 if hasattr(app, 'extensions'):
26 if hasattr(app, 'extensions'):
27 app.extensions.append('sympyprinting')
27 app.extensions.append('sympyprinting')
28 else:
28 else:
29 app.extensions = ['sympyprinting']
29 app.extensions = ['sympyprinting']
30
30
General Comments 0
You need to be logged in to leave comments. Login now