Show More
@@ -1,24 +1,26 b'' | |||||
1 | c = get_config() |
|
1 | c = get_config() | |
|
2 | app = c.IPythonApp | |||
2 |
|
3 | |||
3 | # 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 | |
4 | # and merge it into the current one. |
|
5 | # and merge it into the current one. | |
5 | load_subconfig('ipython_config.py') |
|
6 | import os | |
|
7 | load_subconfig(os.path.join('..','profile_default', 'ipython_config.py')) | |||
6 |
|
8 | |||
7 | lines = """ |
|
9 | lines = """ | |
8 |
from IPython. |
|
10 | from IPython.parallel import * | |
9 | """ |
|
11 | """ | |
10 |
|
12 | |||
11 | # You have to make sure that attributes that are containers already |
|
13 | # You have to make sure that attributes that are containers already | |
12 | # exist before using them. Simple assigning a new list will override |
|
14 | # exist before using them. Simple assigning a new list will override | |
13 | # all previous values. |
|
15 | # all previous values. | |
14 |
if hasattr( |
|
16 | if hasattr(app, 'exec_lines'): | |
15 |
|
|
17 | app.exec_lines.append(lines) | |
16 | else: |
|
18 | else: | |
17 |
|
|
19 | app.exec_lines = [lines] | |
18 |
|
20 | |||
19 | # Load the parallelmagic extension to enable %result, %px, %autopx magics. |
|
21 | # Load the parallelmagic extension to enable %result, %px, %autopx magics. | |
20 |
if hasattr( |
|
22 | if hasattr(app, 'extensions'): | |
21 |
|
|
23 | app.extensions.append('parallelmagic') | |
22 | else: |
|
24 | else: | |
23 |
|
|
25 | app.extensions = ['parallelmagic'] | |
24 |
|
26 |
@@ -2,35 +2,36 b'' | |||||
2 | c = get_config() |
|
2 | c = get_config() | |
3 |
|
3 | |||
4 | #----------------------------------------------------------------------------- |
|
4 | #----------------------------------------------------------------------------- | |
5 |
# |
|
5 | # Application-level options | |
6 | #----------------------------------------------------------------------------- |
|
6 | #----------------------------------------------------------------------------- | |
|
7 | app = c.IPythonApp | |||
7 |
|
8 | |||
8 |
# |
|
9 | # app.display_banner = True | |
9 |
|
10 | |||
10 |
# |
|
11 | # app.classic = False | |
11 |
|
12 | |||
12 |
# |
|
13 | # app.nosep = True | |
13 |
|
14 | |||
14 | # If you still use multiple versions of IPytho on the same machine, |
|
15 | # If you still use multiple versions of IPytho on the same machine, | |
15 | # set this to True to suppress warnings about old configuration files |
|
16 | # set this to True to suppress warnings about old configuration files | |
16 |
# |
|
17 | # app.ignore_old_config = False | |
17 |
|
18 | |||
18 | # Set this to determine the detail of what is logged at startup. |
|
19 | # Set this to determine the detail of what is logged at startup. | |
19 | # The default is 30 and possible values are 0,10,20,30,40,50. |
|
20 | # The default is 30 and possible values are 0,10,20,30,40,50. | |
20 |
# |
|
21 | # app.log_level = 20 | |
21 |
|
22 | |||
22 | # This should be a list of importable Python modules that have an |
|
23 | # This should be a list of importable Python modules that have an | |
23 | # load_ipython_extension(ip) method. This method gets called when the extension |
|
24 | # load_ipython_extension(ip) method. This method gets called when the extension | |
24 | # is loaded. You can put your extensions anywhere they can be imported |
|
25 | # is loaded. You can put your extensions anywhere they can be imported | |
25 | # but we add the extensions subdir of the ipython directory to sys.path |
|
26 | # but we add the extensions subdir of the ipython directory to sys.path | |
26 | # during extension loading, so you can put them there as well. |
|
27 | # during extension loading, so you can put them there as well. | |
27 |
# |
|
28 | # app.extensions = [ | |
28 | # 'myextension' |
|
29 | # 'myextension' | |
29 | # ] |
|
30 | # ] | |
30 |
|
31 | |||
31 | # These lines are run in IPython in the user's namespace after extensions |
|
32 | # These lines are run in IPython in the user's namespace after extensions | |
32 | # are loaded. They can contain full IPython syntax with magics etc. |
|
33 | # are loaded. They can contain full IPython syntax with magics etc. | |
33 |
# |
|
34 | # app.exec_lines = [ | |
34 | # 'import numpy', |
|
35 | # 'import numpy', | |
35 | # 'a = 10; b = 20', |
|
36 | # 'a = 10; b = 20', | |
36 | # '1/0' |
|
37 | # '1/0' | |
@@ -40,7 +41,7 b' c = get_config()' | |||||
40 | # extension need to be pure Python. Files with a .ipy extension can have |
|
41 | # extension need to be pure Python. Files with a .ipy extension can have | |
41 | # custom IPython syntax (like magics, etc.). |
|
42 | # custom IPython syntax (like magics, etc.). | |
42 | # These files need to be in the cwd, the ipython_dir or be absolute paths. |
|
43 | # These files need to be in the cwd, the ipython_dir or be absolute paths. | |
43 |
# |
|
44 | # app.exec_files = [ | |
44 | # 'mycode.py', |
|
45 | # 'mycode.py', | |
45 | # 'fancy.ipy' |
|
46 | # 'fancy.ipy' | |
46 | # ] |
|
47 | # ] |
@@ -1,8 +1,10 b'' | |||||
1 | c = get_config() |
|
1 | c = get_config() | |
|
2 | app = c.IPythonApp | |||
2 |
|
3 | |||
3 | # 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 | |
4 | # and merge it into the current one. |
|
5 | # and merge it into the current one. | |
5 | load_subconfig('ipython_config.py') |
|
6 | import os | |
|
7 | load_subconfig(os.path.join('..','profile_default', 'ipython_config.py')) | |||
6 |
|
8 | |||
7 | lines = """ |
|
9 | lines = """ | |
8 | import cmath |
|
10 | import cmath | |
@@ -12,8 +14,9 b' from math import *' | |||||
12 | # You have to make sure that attributes that are containers already |
|
14 | # You have to make sure that attributes that are containers already | |
13 | # exist before using them. Simple assigning a new list will override |
|
15 | # exist before using them. Simple assigning a new list will override | |
14 | # all previous values. |
|
16 | # all previous values. | |
15 | if hasattr(c.Global, 'exec_lines'): |
|
17 | ||
16 | c.Global.exec_lines.append(lines) |
|
18 | if hasattr(app, 'exec_lines'): | |
|
19 | app.exec_lines.append(lines) | |||
17 | else: |
|
20 | else: | |
18 |
|
|
21 | app.exec_lines = [lines] | |
19 |
|
22 |
@@ -1,13 +1,15 b'' | |||||
1 | c = get_config() |
|
1 | c = get_config() | |
|
2 | app = c.IPythonApp | |||
2 |
|
3 | |||
3 | # 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 | |
4 | # and merge it into the current one. |
|
5 | # and merge it into the current one. | |
5 | load_subconfig('ipython_config.py') |
|
6 | import os | |
|
7 | load_subconfig(os.path.join('..','profile_default', 'ipython_config.py')) | |||
6 |
|
8 | |||
7 | lines = """ |
|
9 | lines = """ | |
8 | import matplotlib |
|
10 | import matplotlib | |
9 | %gui -a wx |
|
11 | %gui qt | |
10 |
matplotlib.use(' |
|
12 | matplotlib.use('qtagg') | |
11 | matplotlib.interactive(True) |
|
13 | matplotlib.interactive(True) | |
12 | from matplotlib import pyplot as plt |
|
14 | from matplotlib import pyplot as plt | |
13 | from matplotlib.pyplot import * |
|
15 | from matplotlib.pyplot import * | |
@@ -16,7 +18,7 b' from matplotlib.pyplot import *' | |||||
16 | # You have to make sure that attributes that are containers already |
|
18 | # You have to make sure that attributes that are containers already | |
17 | # exist before using them. Simple assigning a new list will override |
|
19 | # exist before using them. Simple assigning a new list will override | |
18 | # all previous values. |
|
20 | # all previous values. | |
19 |
if hasattr( |
|
21 | if hasattr(app, 'exec_lines'): | |
20 |
|
|
22 | app.exec_lines.append(lines) | |
21 | else: |
|
23 | else: | |
22 |
|
|
24 | app.exec_lines = [lines] No newline at end of file |
@@ -1,8 +1,10 b'' | |||||
1 | c = get_config() |
|
1 | c = get_config() | |
|
2 | app = c.IPythonApp | |||
2 |
|
3 | |||
3 | # 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 | |
4 | # and merge it into the current one. |
|
5 | # and merge it into the current one. | |
5 | load_subconfig('ipython_config.py') |
|
6 | import os | |
|
7 | load_subconfig(os.path.join('..','profile_default', 'ipython_config.py')) | |||
6 |
|
8 | |||
7 | c.InteractiveShell.prompt_in1 = '\C_LightGreen\u@\h\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> ' |
|
9 | c.InteractiveShell.prompt_in1 = '\C_LightGreen\u@\h\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> ' | |
8 | c.InteractiveShell.prompt_in2 = '\C_Green|\C_LightGreen\D\C_Green> ' |
|
10 | c.InteractiveShell.prompt_in2 = '\C_Green|\C_LightGreen\D\C_Green> ' | |
@@ -23,7 +25,7 b' lines = """' | |||||
23 | # You have to make sure that attributes that are containers already |
|
25 | # You have to make sure that attributes that are containers already | |
24 | # exist before using them. Simple assigning a new list will override |
|
26 | # exist before using them. Simple assigning a new list will override | |
25 | # all previous values. |
|
27 | # all previous values. | |
26 |
if hasattr( |
|
28 | if hasattr(app, 'exec_lines'): | |
27 |
|
|
29 | app.exec_lines.append(lines) | |
28 | else: |
|
30 | else: | |
29 |
|
|
31 | app.exec_lines = [lines] No newline at end of file |
@@ -1,8 +1,10 b'' | |||||
1 | c = get_config() |
|
1 | c = get_config() | |
|
2 | app = c.IPythonApp | |||
2 |
|
3 | |||
3 | # 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 | |
4 | # and merge it into the current one. |
|
5 | # and merge it into the current one. | |
5 | load_subconfig('ipython_config.py') |
|
6 | import os | |
|
7 | load_subconfig(os.path.join('..','profile_default', 'ipython_config.py')) | |||
6 |
|
8 | |||
7 | lines = """ |
|
9 | lines = """ | |
8 | from __future__ import division |
|
10 | from __future__ import division | |
@@ -16,14 +18,14 b" f, g, h = map(Function, 'fgh')" | |||||
16 | # exist before using them. Simple assigning a new list will override |
|
18 | # exist before using them. Simple assigning a new list will override | |
17 | # all previous values. |
|
19 | # all previous values. | |
18 |
|
20 | |||
19 |
if hasattr( |
|
21 | if hasattr(app, 'exec_lines'): | |
20 |
|
|
22 | app.exec_lines.append(lines) | |
21 | else: |
|
23 | else: | |
22 |
|
|
24 | app.exec_lines = [lines] | |
23 |
|
25 | |||
24 | # Load the sympy_printing extension to enable nice printing of sympy expr's. |
|
26 | # Load the sympy_printing extension to enable nice printing of sympy expr's. | |
25 |
if hasattr( |
|
27 | if hasattr(app, 'extensions'): | |
26 |
|
|
28 | app.extensions.append('sympy_printing') | |
27 | else: |
|
29 | else: | |
28 |
|
|
30 | app.extensions = ['sympy_printing'] | |
29 |
|
31 |
General Comments 0
You need to be logged in to leave comments.
Login now