From a7af0130632639ce558b0562a51137860a688ad0 2011-07-13 21:38:16 From: Brian E. Granger Date: 2011-07-13 21:38:16 Subject: [PATCH] Fixing command line options and help strings to use new syntax. * Found a few places we had missed in the code and docs. --- diff --git a/IPython/frontend/terminal/ipapp.py b/IPython/frontend/terminal/ipapp.py index c4c7c48..37cdf5a 100755 --- a/IPython/frontend/terminal/ipapp.py +++ b/IPython/frontend/terminal/ipapp.py @@ -61,7 +61,7 @@ default_config_file_name = u'ipython_config.py' _examples = """ ipython --pylab # start in pylab mode ipython --pylab=qt # start in pylab mode with the qt4 backend -ipython --log_level=DEBUG # set logging to DEBUG +ipython --log-level=DEBUG # set logging to DEBUG ipython --profile=foo # start with profile foo ipython qtconsole # start the qtconsole GUI application diff --git a/IPython/parallel/apps/launcher.py b/IPython/parallel/apps/launcher.py index 7168a67..24cece0 100644 --- a/IPython/parallel/apps/launcher.py +++ b/IPython/parallel/apps/launcher.py @@ -576,7 +576,7 @@ class SSHEngineLauncher(SSHLauncher): help="remote ipengine command.") # Command line arguments for ipengine. program_args = List( - ['--log-to-file','log_level=%i'%logging.INFO], config=True, + ['--log-to-file','--log_level=%i'%logging.INFO], config=True, help="Command line arguments to ipengine." ) diff --git a/docs/source/interactive/reference.txt b/docs/source/interactive/reference.txt index 8ae9859..550b492 100644 --- a/docs/source/interactive/reference.txt +++ b/docs/source/interactive/reference.txt @@ -87,7 +87,7 @@ All options with a [no] prepended can be specified in negated form execute the given command string. This is similar to the -c option in the normal Python interpreter. - ``--cache_size=`` + ``--cache-size=`` size of the output cache (maximum number of entries to hold in memory). The default is 1000, you can change it permanently in your config file. Setting it to 0 completely disables the caching system, diff --git a/docs/source/parallel/parallel_process.txt b/docs/source/parallel/parallel_process.txt index 6a52ec6..ffa2df1 100644 --- a/docs/source/parallel/parallel_process.txt +++ b/docs/source/parallel/parallel_process.txt @@ -253,7 +253,7 @@ to specify your own. Here is a sample PBS script template: cd $PBS_O_WORKDIR export PATH=$HOME/usr/local/bin export PYTHONPATH=$HOME/usr/local/lib/python2.7/site-packages - /usr/local/bin/mpiexec -n {n} ipengine --profile_dir={profile_dir} + /usr/local/bin/mpiexec -n {n} ipengine --profile-dir={profile_dir} There are a few important points about this template: @@ -288,7 +288,7 @@ The controller template should be similar, but simpler: cd $PBS_O_WORKDIR export PATH=$HOME/usr/local/bin export PYTHONPATH=$HOME/usr/local/lib/python2.7/site-packages - ipcontroller --profile_dir={profile_dir} + ipcontroller --profile-dir={profile_dir} Once you have created these scripts, save them with names like @@ -373,8 +373,8 @@ The controller's remote location and configuration can be specified: # Set the arguments to be passed to ipcontroller # note that remotely launched ipcontroller will not get the contents of # the local ipcontroller_config.py unless it resides on the *remote host* - # in the location specified by the `profile_dir` argument. - # c.SSHControllerLauncher.program_args = ['--reuse', '--ip=*', '--profile_dir=/path/to/cd'] + # in the location specified by the `profile-dir` argument. + # c.SSHControllerLauncher.program_args = ['--reuse', '--ip=*', '--profile-dir=/path/to/cd'] .. note:: @@ -390,7 +390,7 @@ on that host. c.SSHEngineSetLauncher.engines = { 'host1.example.com' : 2, 'host2.example.com' : 5, - 'host3.example.com' : (1, ['--profile_dir=/home/different/location']), + 'host3.example.com' : (1, ['--profile-dir=/home/different/location']), 'host4.example.com' : 8 } * The `engines` dict, where the keys are the host we want to run engines on and @@ -403,7 +403,7 @@ a single location: .. sourcecode:: python - c.SSHEngineSetLauncher.engine_args = ['--profile_dir=/path/to/profile_ssh'] + c.SSHEngineSetLauncher.engine_args = ['--profile-dir=/path/to/profile_ssh'] Current limitations of the SSH mode of :command:`ipcluster` are: