##// END OF EJS Templates
This is a manual merge of certain things in the ipython1-dev branch, revision 46, into the main ...
This is a manual merge of certain things in the ipython1-dev branch, revision 46, into the main ipython branch. This is not a true merge in the formal sense because all history is not coming over with the files. For a detailed history of the added files, please see the ipython1-dev branch or the svn repository on scipy.org that ipython1-dev came from. More specifically, here is what I have done in this commit: 1) Moved the following by hand ipython1.config -> IPython.config ipython1.kernel -> IPython.kernel ipython1.external -> IPython.external ipython1.core -> IPython.kernel.core ipython1.testutils -> IPython.testing ipython1.tools -> IPython.tools 2) Moved IPython.tools.guid -> IPython1.external.guid 3) Renamed: ipython1 -> IPython IPython.core -> IPython.kernel.core IPython.testutils -> IPython.testing 4) Then did a "bzr add" for all the new stuff. That is all folks!

File last commit:

r1234:52b55407
r1234:52b55407
Show More
__init__.py
124 lines | 4.2 KiB | text/x-python | PythonLexer
# encoding: utf-8
"""Default kernel configuration."""
__docformat__ = "restructuredtext en"
#-------------------------------------------------------------------------------
# Copyright (C) 2008 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Imports
#-------------------------------------------------------------------------------
from IPython.external.configobj import ConfigObj
from IPython.config.api import ConfigObjManager
from IPython.config.cutils import get_ipython_dir
default_kernel_config = ConfigObj()
try:
ipython_dir = get_ipython_dir() + '/'
except:
# This will defaults to the cwd
ipython_dir = ''
#-------------------------------------------------------------------------------
# Engine Configuration
#-------------------------------------------------------------------------------
engine_config = dict(
logfile = '', # Empty means log to stdout
furl_file = ipython_dir + 'ipcontroller-engine.furl'
)
#-------------------------------------------------------------------------------
# MPI Configuration
#-------------------------------------------------------------------------------
mpi_config = dict(
mpi4py = """from mpi4py import MPI as mpi
mpi.size = mpi.COMM_WORLD.Get_size()
mpi.rank = mpi.COMM_WORLD.Get_rank()
""",
pytrilinos = """from PyTrilinos import Epetra
class SimpleStruct:
pass
mpi = SimpleStruct()
mpi.rank = 0
mpi.size = 0
""",
default = ''
)
#-------------------------------------------------------------------------------
# Controller Configuration
#-------------------------------------------------------------------------------
controller_config = dict(
logfile = '', # Empty means log to stdout
import_statement = '',
engine_tub = dict(
ip = '', # Empty string means all interfaces
port = 0, # 0 means pick a port for me
location = '', # Empty string means try to set automatically
secure = True,
cert_file = ipython_dir + 'ipcontroller-engine.pem',
),
engine_fc_interface = 'IPython.kernel.enginefc.IFCControllerBase',
engine_furl_file = ipython_dir + 'ipcontroller-engine.furl',
controller_interfaces = dict(
# multiengine = dict(
# controller_interface = 'IPython.kernel.multiengine.IMultiEngine',
# fc_interface = 'IPython.kernel.multienginefc.IFCMultiEngine',
# furl_file = 'ipcontroller-mec.furl'
# ),
task = dict(
controller_interface = 'IPython.kernel.task.ITaskController',
fc_interface = 'IPython.kernel.taskfc.IFCTaskController',
furl_file = ipython_dir + 'ipcontroller-tc.furl'
),
multiengine = dict(
controller_interface = 'IPython.kernel.multiengine.IMultiEngine',
fc_interface = 'IPython.kernel.multienginefc.IFCSynchronousMultiEngine',
furl_file = ipython_dir + 'ipcontroller-mec.furl'
)
),
client_tub = dict(
ip = '', # Empty string means all interfaces
port = 0, # 0 means pick a port for me
location = '', # Empty string means try to set automatically
secure = True,
cert_file = ipython_dir + 'ipcontroller-client.pem'
)
)
#-------------------------------------------------------------------------------
# Client Configuration
#-------------------------------------------------------------------------------
client_config = dict(
client_interfaces = dict(
task = dict(
furl_file = ipython_dir + 'ipcontroller-tc.furl'
),
multiengine = dict(
furl_file = ipython_dir + 'ipcontroller-mec.furl'
)
)
)
default_kernel_config['engine'] = engine_config
default_kernel_config['mpi'] = mpi_config
default_kernel_config['controller'] = controller_config
default_kernel_config['client'] = client_config
config_manager = ConfigObjManager(default_kernel_config, 'IPython.kernel.ini')