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