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