Show More
@@ -1,19 +1,13 b'' | |||
|
1 | 1 | c = get_config() |
|
2 | 2 | app = c.InteractiveShellApp |
|
3 | 3 | |
|
4 | 4 | # This can be used at any point in a config file to load a sub config |
|
5 | 5 | # and merge it into the current one. |
|
6 | 6 | load_subconfig('ipython_config.py', profile='default') |
|
7 | 7 | |
|
8 | 8 | lines = """ |
|
9 | 9 | from IPython.parallel import * |
|
10 | 10 | """ |
|
11 | 11 | |
|
12 | # You have to make sure that attributes that are containers already | |
|
13 | # exist before using them. Simple assigning a new list will override | |
|
14 | # all previous values. | |
|
15 | if hasattr(app, 'exec_lines'): | |
|
16 | 12 |
|
|
17 | else: | |
|
18 | app.exec_lines = [lines] | |
|
19 | 13 |
@@ -1,21 +1,13 b'' | |||
|
1 | 1 | c = get_config() |
|
2 | 2 | app = c.InteractiveShellApp |
|
3 | 3 | |
|
4 | 4 | # This can be used at any point in a config file to load a sub config |
|
5 | 5 | # and merge it into the current one. |
|
6 | 6 | load_subconfig('ipython_config.py', profile='default') |
|
7 | 7 | |
|
8 | 8 | lines = """ |
|
9 | 9 | import cmath |
|
10 | 10 | from math import * |
|
11 | 11 | """ |
|
12 | 12 | |
|
13 | # You have to make sure that attributes that are containers already | |
|
14 | # exist before using them. Simple assigning a new list will override | |
|
15 | # all previous values. | |
|
16 | ||
|
17 | if hasattr(app, 'exec_lines'): | |
|
18 | 13 |
|
|
19 | else: | |
|
20 | app.exec_lines = [lines] | |
|
21 |
@@ -1,30 +1,24 b'' | |||
|
1 | 1 | c = get_config() |
|
2 | 2 | app = c.InteractiveShellApp |
|
3 | 3 | |
|
4 | 4 | # This can be used at any point in a config file to load a sub config |
|
5 | 5 | # and merge it into the current one. |
|
6 | 6 | load_subconfig('ipython_config.py', profile='default') |
|
7 | 7 | |
|
8 | 8 | c.PromptManager.in_template = r'{color.LightGreen}\u@\h{color.LightBlue}[{color.LightCyan}\Y1{color.LightBlue}]{color.Green}|\#> ' |
|
9 | 9 | c.PromptManager.in2_template = r'{color.Green}|{color.LightGreen}\D{color.Green}> ' |
|
10 | 10 | c.PromptManager.out_template = r'<\#> ' |
|
11 | 11 | |
|
12 | 12 | c.PromptManager.justify = True |
|
13 | 13 | |
|
14 | 14 | c.InteractiveShell.separate_in = '' |
|
15 | 15 | c.InteractiveShell.separate_out = '' |
|
16 | 16 | c.InteractiveShell.separate_out2 = '' |
|
17 | 17 | |
|
18 | 18 | c.PrefilterManager.multi_line_specials = True |
|
19 | 19 | |
|
20 | 20 | lines = """ |
|
21 | 21 | %rehashx |
|
22 | 22 | """ |
|
23 | 23 | |
|
24 | # You have to make sure that attributes that are containers already | |
|
25 | # exist before using them. Simple assigning a new list will override | |
|
26 | # all previous values. | |
|
27 | if hasattr(app, 'exec_lines'): | |
|
28 | 24 |
|
|
29 | else: | |
|
30 | app.exec_lines = [lines] |
@@ -1,30 +1,20 b'' | |||
|
1 | 1 | c = get_config() |
|
2 | 2 | app = c.InteractiveShellApp |
|
3 | 3 | |
|
4 | 4 | # This can be used at any point in a config file to load a sub config |
|
5 | 5 | # and merge it into the current one. |
|
6 | 6 | load_subconfig('ipython_config.py', profile='default') |
|
7 | 7 | |
|
8 | 8 | lines = """ |
|
9 | 9 | from __future__ import division |
|
10 | 10 | from sympy import * |
|
11 | 11 | x, y, z, t = symbols('x y z t') |
|
12 | 12 | k, m, n = symbols('k m n', integer=True) |
|
13 | 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 | |
|
17 | # exist before using them. Simple assigning a new list will override | |
|
18 | # all previous values. | |
|
19 | ||
|
20 | if hasattr(app, 'exec_lines'): | |
|
21 | 16 |
|
|
22 | else: | |
|
23 | app.exec_lines = [lines] | |
|
24 | 17 | |
|
25 | 18 | # Load the sympy_printing extension to enable nice printing of sympy expr's. |
|
26 | if hasattr(app, 'extensions'): | |
|
27 | app.extensions.append('sympyprinting') | |
|
28 | else: | |
|
29 | app.extensions = ['sympyprinting'] | |
|
19 | app.extensions.append('sympy.interactive.ipythonprinting') | |
|
30 | 20 |
General Comments 0
You need to be logged in to leave comments.
Login now