Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update config files to match new namespace.

  • Loading branch information...
commit 4d6be302db10d98215e9c40c81a1d241601462e7 1 parent d748312
@minrk authored
View
18 IPython/config/profile/cluster/ipython_config.py
@@ -1,24 +1,26 @@
c = get_config()
+app = c.IPythonApp
# This can be used at any point in a config file to load a sub config
# and merge it into the current one.
-load_subconfig('ipython_config.py')
+import os
+load_subconfig(os.path.join('..','profile_default', 'ipython_config.py'))
lines = """
-from IPython.kernel.client import *
+from IPython.parallel import *
"""
# You have to make sure that attributes that are containers already
# exist before using them. Simple assigning a new list will override
# all previous values.
-if hasattr(c.Global, 'exec_lines'):
- c.Global.exec_lines.append(lines)
+if hasattr(app, 'exec_lines'):
+ app.exec_lines.append(lines)
else:
- c.Global.exec_lines = [lines]
+ app.exec_lines = [lines]
# Load the parallelmagic extension to enable %result, %px, %autopx magics.
-if hasattr(c.Global, 'extensions'):
- c.Global.extensions.append('parallelmagic')
+if hasattr(app, 'extensions'):
+ app.extensions.append('parallelmagic')
else:
- c.Global.extensions = ['parallelmagic']
+ app.extensions = ['parallelmagic']
View
19 IPython/config/profile/default/ipython_config.py
@@ -2,35 +2,36 @@
c = get_config()
#-----------------------------------------------------------------------------
-# Global options
+# Application-level options
#-----------------------------------------------------------------------------
+app = c.IPythonApp
-# c.Global.display_banner = True
+# app.display_banner = True
-# c.Global.classic = False
+# app.classic = False
-# c.Global.nosep = True
+# app.nosep = True
# If you still use multiple versions of IPytho on the same machine,
# set this to True to suppress warnings about old configuration files
-# c.Global.ignore_old_config = False
+# app.ignore_old_config = False
# Set this to determine the detail of what is logged at startup.
# The default is 30 and possible values are 0,10,20,30,40,50.
-# c.Global.log_level = 20
+# app.log_level = 20
# This should be a list of importable Python modules that have an
# load_ipython_extension(ip) method. This method gets called when the extension
# is loaded. You can put your extensions anywhere they can be imported
# but we add the extensions subdir of the ipython directory to sys.path
# during extension loading, so you can put them there as well.
-# c.Global.extensions = [
+# app.extensions = [
# 'myextension'
# ]
# These lines are run in IPython in the user's namespace after extensions
# are loaded. They can contain full IPython syntax with magics etc.
-# c.Global.exec_lines = [
+# app.exec_lines = [
# 'import numpy',
# 'a = 10; b = 20',
# '1/0'
@@ -40,7 +41,7 @@
# extension need to be pure Python. Files with a .ipy extension can have
# custom IPython syntax (like magics, etc.).
# These files need to be in the cwd, the ipython_dir or be absolute paths.
-# c.Global.exec_files = [
+# app.exec_files = [
# 'mycode.py',
# 'fancy.ipy'
# ]
View
11 IPython/config/profile/math/ipython_config.py
@@ -1,8 +1,10 @@
c = get_config()
+app = c.IPythonApp
# This can be used at any point in a config file to load a sub config
# and merge it into the current one.
-load_subconfig('ipython_config.py')
+import os
+load_subconfig(os.path.join('..','profile_default', 'ipython_config.py'))
lines = """
import cmath
@@ -12,8 +14,9 @@
# You have to make sure that attributes that are containers already
# exist before using them. Simple assigning a new list will override
# all previous values.
-if hasattr(c.Global, 'exec_lines'):
- c.Global.exec_lines.append(lines)
+
+if hasattr(app, 'exec_lines'):
+ app.exec_lines.append(lines)
else:
- c.Global.exec_lines = [lines]
+ app.exec_lines = [lines]
View
14 IPython/config/profile/pylab/ipython_config.py
@@ -1,13 +1,15 @@
c = get_config()
+app = c.IPythonApp
# This can be used at any point in a config file to load a sub config
# and merge it into the current one.
-load_subconfig('ipython_config.py')
+import os
+load_subconfig(os.path.join('..','profile_default', 'ipython_config.py'))
lines = """
import matplotlib
-%gui -a wx
-matplotlib.use('wxagg')
+%gui qt
+matplotlib.use('qtagg')
matplotlib.interactive(True)
from matplotlib import pyplot as plt
from matplotlib.pyplot import *
@@ -16,7 +18,7 @@
# You have to make sure that attributes that are containers already
# exist before using them. Simple assigning a new list will override
# all previous values.
-if hasattr(c.Global, 'exec_lines'):
- c.Global.exec_lines.append(lines)
+if hasattr(app, 'exec_lines'):
+ app.exec_lines.append(lines)
else:
- c.Global.exec_lines = [lines]
+ app.exec_lines = [lines]
View
10 IPython/config/profile/pysh/ipython_config.py
@@ -1,8 +1,10 @@
c = get_config()
+app = c.IPythonApp
# This can be used at any point in a config file to load a sub config
# and merge it into the current one.
-load_subconfig('ipython_config.py')
+import os
+load_subconfig(os.path.join('..','profile_default', 'ipython_config.py'))
c.InteractiveShell.prompt_in1 = '\C_LightGreen\u@\h\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> '
c.InteractiveShell.prompt_in2 = '\C_Green|\C_LightGreen\D\C_Green> '
@@ -23,7 +25,7 @@
# You have to make sure that attributes that are containers already
# exist before using them. Simple assigning a new list will override
# all previous values.
-if hasattr(c.Global, 'exec_lines'):
- c.Global.exec_lines.append(lines)
+if hasattr(app, 'exec_lines'):
+ app.exec_lines.append(lines)
else:
- c.Global.exec_lines = [lines]
+ app.exec_lines = [lines]
View
16 IPython/config/profile/sympy/ipython_config.py
@@ -1,8 +1,10 @@
c = get_config()
+app = c.IPythonApp
# This can be used at any point in a config file to load a sub config
# and merge it into the current one.
-load_subconfig('ipython_config.py')
+import os
+load_subconfig(os.path.join('..','profile_default', 'ipython_config.py'))
lines = """
from __future__ import division
@@ -16,14 +18,14 @@
# exist before using them. Simple assigning a new list will override
# all previous values.
-if hasattr(c.Global, 'exec_lines'):
- c.Global.exec_lines.append(lines)
+if hasattr(app, 'exec_lines'):
+ app.exec_lines.append(lines)
else:
- c.Global.exec_lines = [lines]
+ app.exec_lines = [lines]
# Load the sympy_printing extension to enable nice printing of sympy expr's.
-if hasattr(c.Global, 'extensions'):
- c.Global.extensions.append('sympy_printing')
+if hasattr(app, 'extensions'):
+ app.extensions.append('sympy_printing')
else:
- c.Global.extensions = ['sympy_printing']
+ app.extensions = ['sympy_printing']

0 comments on commit 4d6be30

Please sign in to comment.
Something went wrong with that request. Please try again.