diff --git a/IPython/config/default/__init__.py b/IPython/config/default/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/IPython/config/default/__init__.py diff --git a/IPython/config/default/ipython_config.py b/IPython/config/default/ipython_config.py new file mode 100644 index 0000000..0f1ad8a --- /dev/null +++ b/IPython/config/default/ipython_config.py @@ -0,0 +1,120 @@ +#----------------------------------------------------------------------------- +# IPython Shell Configuration Defaults +#----------------------------------------------------------------------------- + +#----------------------------------------------------------------------------- +# Startup +#----------------------------------------------------------------------------- + +AUTOCALL = True + +AUTOEDIT_SYNTAX = False + +AUTOINDENT = True + +AUTOMAGIC = True + +CACHE_SIZE = 1000 + +CLASSIC = False + +COLORS = 'Linux' + +COLOR_INFO = True + +CONFIRM_EXIT = True + +DEEP_RELOAD = False + +EDITOR = 0 + +LOG = True + +LOGFILE = '' + +BANNER = True + +MESSAGES = True + +PDB = False + +PPRINT = True + +PROMPT_IN1 = 'In [\#]: ' + +PROMPT_IN2 = ' .\D.: ' + +PROMPT_OUT = 'Out[\#]: ' + +PROMPTS_PAD_LEFT = True + +QUICK = False + +SCREEN_LENGTH = 0 + +SEPARATE_IN = '\n' +SEPARATE_OUT = '' +SEPARATE_OUT2 = '' +NOSEP = False + +WILDCARDS_CASE_SENSITIVE = True + +OBJECT_INFO_STRING_LEVEL = 0 + +XMODE = 'Context' + +MULTI_LINE_SPECIALS = True + +SYSTEM_HEADER = "IPython system call: " + +SYSTEM_VERBOSE = True + +#----------------------------------------------------------------------------- +# Readline +#----------------------------------------------------------------------------- + +READLINE = True + +READLINE_PARSE_AND_BIND = [ + 'tab: complete', + '"\C-l": possible-completions', + 'set show-all-if-ambiguous on', + '"\C-o": tab-insert', + '"\M-i": " "', + '"\M-o": "\d\d\d\d"', + '"\M-I": "\d\d\d\d"', + '"\C-r": reverse-search-history', + '"\C-s": forward-search-history', + '"\C-p": history-search-backward', + '"\C-n": history-search-forward', + '"\e[A": history-search-backward', + '"\e[B": history-search-forward', + '"\C-k": kill-line', + '"\C-u": unix-line-discard', +] + +READLINE_REMOVE_DELIMS = '-/~' + +READLINE_MERGE_COMPLETIONS = True + +READLINE_OMIT_NAMES = 0 + +#----------------------------------------------------------------------------- +# Code to execute +#----------------------------------------------------------------------------- + +EXECUTE = [ + 'import numpy as np', + 'import sympy', + 'a = 10' +] + +EXECFILE = [] + +#----------------------------------------------------------------------------- +# Alias +#----------------------------------------------------------------------------- + +ALIAS = [ + ('myls', 'ls -la') +] \ No newline at end of file diff --git a/IPython/config/default/kernel_config.py b/IPython/config/default/kernel_config.py new file mode 100644 index 0000000..0eec0dd --- /dev/null +++ b/IPython/config/default/kernel_config.py @@ -0,0 +1,62 @@ +from os.path import join +pjoin = join + +from IPython.utils.genutils import get_ipython_dir, get_security_dir +security_dir = get_security_dir() + + +ENGINE_LOGFILE = '' + +ENGINE_FURL_FILE = 'ipcontroller-engine.furl' + +MPI_CONFIG_MPI4PY = """from mpi4py import MPI as mpi +mpi.size = mpi.COMM_WORLD.Get_size() +mpi.rank = mpi.COMM_WORLD.Get_rank() +""" + +MPI_CONFIG_PYTRILINOS = """from PyTrilinos import Epetra +class SimpleStruct: +pass +mpi = SimpleStruct() +mpi.rank = 0 +mpi.size = 0 +""" + +MPI_DEFAULT = '' + +CONTROLLER_LOGFILE = '' +CONTROLLER_IMPORT_STATEMENT = '' +CONTROLLER_REUSE_FURLS = False + +ENGINE_TUB_IP = '' +ENGINE_TUB_PORT = 0 +ENGINE_TUB_LOCATION = '' +ENGINE_TUB_SECURE = True +ENGINE_TUB_CERT_FILE = 'ipcontroller-engine.pem' +ENGINE_FC_INTERFACE = 'IPython.kernel.enginefc.IFCControllerBase' +ENGINE_FURL_FILE = 'ipcontroller-engine.furl' + +CONTROLLER_INTERFACES = dict( + TASK = dict( + CONTROLLER_INTERFACE = 'IPython.kernel.task.ITaskController', + FC_INTERFACE = 'IPython.kernel.taskfc.IFCTaskController', + FURL_FILE = pjoin(security_dir, 'ipcontroller-tc.furl') + ), + MULTIENGINE = dict( + CONTROLLER_INTERFACE = 'IPython.kernel.multiengine.IMultiEngine', + FC_INTERFACE = 'IPython.kernel.multienginefc.IFCSynchronousMultiEngine', + FURL_FILE = pjoin(security_dir, 'ipcontroller-mec.furl') + ) +) + +CLIENT_TUB_IP = '' +CLIENT_TUB_PORT = 0 +CLIENT_TUB_LOCATION = '' +CLIENT_TUB_SECURE = True +CLIENT_TUB_CERT_FILE = 'ipcontroller-client.pem' + +CLIENT_INTERFACES = dict( + TASK = dict(FURL_FILE = 'ipcontroller-tc.furl'), + MULTIENGINE = dict(FURLFILE='ipcontroller-mec.furl') +) + diff --git a/IPython/config/profile/__init_.py b/IPython/config/profile/__init_.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/IPython/config/profile/__init_.py diff --git a/IPython/config/profile/ipython_config_math.py b/IPython/config/profile/ipython_config_math.py new file mode 100644 index 0000000..f18448e --- /dev/null +++ b/IPython/config/profile/ipython_config_math.py @@ -0,0 +1,9 @@ +from ipython_config import * + +EXECUTE.extend([ + 'import cmath', + 'from math import *', + 'print "*** math functions available globally, cmath as a module"' + +]) + diff --git a/IPython/config/profile/ipython_config_numeric.py b/IPython/config/profile/ipython_config_numeric.py new file mode 100644 index 0000000..70a731e --- /dev/null +++ b/IPython/config/profile/ipython_config_numeric.py @@ -0,0 +1,8 @@ +from ipython_config import * + +EXECUTE.extend([ + 'import numpy', + 'import scipy', + 'import numpy as np', + 'import scipy as sp', +]) \ No newline at end of file diff --git a/IPython/config/profile/ipython_config_pylab.py b/IPython/config/profile/ipython_config_pylab.py new file mode 100644 index 0000000..705b665 --- /dev/null +++ b/IPython/config/profile/ipython_config_pylab.py @@ -0,0 +1,7 @@ +from ipython_config_numeric import * + +EXECUTE.extend([ + + +]) + diff --git a/IPython/config/profile/ipython_config_pysh.py b/IPython/config/profile/ipython_config_pysh.py new file mode 100644 index 0000000..1720b87 --- /dev/null +++ b/IPython/config/profile/ipython_config_pysh.py @@ -0,0 +1,15 @@ +from ipython_config import * + +EXECUTE.insert(0, 'from IPython.extensions.InterpreterExec import *') + +PROMPT_IN1 = '\C_LightGreen\u@\h\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> ' +PROMPT_IN2 = '\C_Green|\C_LightGreen\D\C_Green> ' +PROMPT_OUT = '<\#> ' + +PROMPTS_PAD_LEFT = True + +SEPARATE_IN = 0 +SEPARATE_OUT = 0 +SEPARATE_OUT2 = 0 + +MULTI_LINE_SPECIALS = True \ No newline at end of file diff --git a/IPython/config/profile/ipython_config_sympy.py b/IPython/config/profile/ipython_config_sympy.py new file mode 100644 index 0000000..a36b833 --- /dev/null +++ b/IPython/config/profile/ipython_config_sympy.py @@ -0,0 +1,9 @@ +from ipython_config import * + +EXECUTE.extend([ + 'from __future__ import division' + 'from sympy import *' + 'x, y, z = symbols('xyz')' + 'k, m, n = symbols('kmn', integer=True)' + 'f, g, h = map(Function, 'fgh')' +])