Show More
@@ -9,11 +9,5 b' lines = """' | |||||
9 | from IPython.parallel import * |
|
9 | from IPython.parallel import * | |
10 | """ |
|
10 | """ | |
11 |
|
11 | |||
12 | # You have to make sure that attributes that are containers already |
|
12 | app.exec_lines.append(lines) | |
13 | # exist before using them. Simple assigning a new list will override |
|
|||
14 | # all previous values. |
|
|||
15 | if hasattr(app, 'exec_lines'): |
|
|||
16 | app.exec_lines.append(lines) |
|
|||
17 | else: |
|
|||
18 | app.exec_lines = [lines] |
|
|||
19 |
|
13 |
@@ -10,12 +10,4 b' import cmath' | |||||
10 | from math import * |
|
10 | from math import * | |
11 | """ |
|
11 | """ | |
12 |
|
12 | |||
13 | # You have to make sure that attributes that are containers already |
|
13 | app.exec_lines.append(lines) | |
14 | # exist before using them. Simple assigning a new list will override |
|
|||
15 | # all previous values. |
|
|||
16 |
|
||||
17 | if hasattr(app, 'exec_lines'): |
|
|||
18 | app.exec_lines.append(lines) |
|
|||
19 | else: |
|
|||
20 | app.exec_lines = [lines] |
|
|||
21 |
|
@@ -21,10 +21,4 b' lines = """' | |||||
21 | %rehashx |
|
21 | %rehashx | |
22 | """ |
|
22 | """ | |
23 |
|
23 | |||
24 | # You have to make sure that attributes that are containers already |
|
24 | app.exec_lines.append(lines) | |
25 | # exist before using them. Simple assigning a new list will override |
|
|||
26 | # all previous values. |
|
|||
27 | if hasattr(app, 'exec_lines'): |
|
|||
28 | app.exec_lines.append(lines) |
|
|||
29 | else: |
|
|||
30 | app.exec_lines = [lines] |
|
@@ -13,18 +13,8 b" k, m, n = symbols('k m n', integer=True)" | |||||
13 | f, g, h = symbols('f g h', cls=Function) |
|
13 | f, g, h = symbols('f g h', cls=Function) | |
14 | """ |
|
14 | """ | |
15 |
|
15 | |||
16 | # You have to make sure that attributes that are containers already |
|
16 | app.exec_lines.append(lines) | |
17 | # exist before using them. Simple assigning a new list will override |
|
|||
18 | # all previous values. |
|
|||
19 |
|
||||
20 | if hasattr(app, 'exec_lines'): |
|
|||
21 | app.exec_lines.append(lines) |
|
|||
22 | else: |
|
|||
23 | app.exec_lines = [lines] |
|
|||
24 |
|
17 | |||
25 | # Load the sympy_printing extension to enable nice printing of sympy expr's. |
|
18 | # Load the sympy_printing extension to enable nice printing of sympy expr's. | |
26 | if hasattr(app, 'extensions'): |
|
19 | app.extensions.append('sympy.interactive.ipythonprinting') | |
27 | app.extensions.append('sympyprinting') |
|
|||
28 | else: |
|
|||
29 | app.extensions = ['sympyprinting'] |
|
|||
30 |
|
20 |
General Comments 0
You need to be logged in to leave comments.
Login now