From 803d13d1c30c1a7b5b82d4b65615ddcfa33837ae 2012-05-03 17:22:41 From: Bradley M. Froehle Date: 2012-05-03 17:22:41 Subject: [PATCH] IPYTHON_DIR -> IPYTHONDIR in comments and documentation --- diff --git a/IPython/core/application.py b/IPython/core/application.py index 4b49a94..90af2bc 100644 --- a/IPython/core/application.py +++ b/IPython/core/application.py @@ -118,7 +118,7 @@ class BaseIPythonApplication(Application): The name of the IPython directory. This directory is used for logging configuration (through profiles), history storage, etc. The default is usually $HOME/.ipython. This options can also be specified through - the environment variable IPYTHON_DIR. + the environment variable IPYTHONDIR. """ ) @@ -148,7 +148,7 @@ class BaseIPythonApplication(Application): def __init__(self, **kwargs): super(BaseIPythonApplication, self).__init__(**kwargs) - # ensure even default IPYTHON_DIR exists + # ensure even default IPYTHONDIR exists if not os.path.exists(self.ipython_dir): self._ipython_dir_changed('ipython_dir', self.ipython_dir, self.ipython_dir) diff --git a/IPython/core/profileapp.py b/IPython/core/profileapp.py index dc1b382..4520c4a 100644 --- a/IPython/core/profileapp.py +++ b/IPython/core/profileapp.py @@ -135,7 +135,7 @@ class ProfileList(Application): The name of the IPython directory. This directory is used for logging configuration (through profiles), history storage, etc. The default is usually $HOME/.ipython. This options can also be specified through - the environment variable IPYTHON_DIR. + the environment variable IPYTHONDIR. """ ) diff --git a/IPython/core/usage.py b/IPython/core/usage.py index 303106f..90506b3 100644 --- a/IPython/core/usage.py +++ b/IPython/core/usage.py @@ -39,10 +39,10 @@ Usage configuration, look into your `ipython_config.py` configuration file for details. - This file is typically installed in the `IPYTHON_DIR` directory, and there + This file is typically installed in the `IPYTHONDIR` directory, and there is a separate configuration directory for each profile. The default profile - directory will be located in $IPYTHON_DIR/profile_default. For Linux users, - IPYTHON_DIR defaults to `$HOME/.config/ipython`, and for other Unix systems + directory will be located in $IPYTHONDIR/profile_default. For Linux users, + IPYTHONDIR defaults to `$HOME/.config/ipython`, and for other Unix systems to `$HOME/.ipython`. For Windows users, $HOME resolves to C:\\Documents and Settings\\YourUserName in most instances. @@ -50,10 +50,10 @@ Usage $> ipython profile create - and start editing `IPYTHON_DIR/profile_default/ipython_config.py` + and start editing `IPYTHONDIR/profile_default/ipython_config.py` In IPython's documentation, we will refer to this directory as - `IPYTHON_DIR`, you can change its default location by creating an + `IPYTHONDIR`, you can change its default location by creating an environment variable with this name and setting it to the desired path. For more information, see the manual available in HTML and PDF in your diff --git a/IPython/utils/path.py b/IPython/utils/path.py index 36f7f14..249713c 100644 --- a/IPython/utils/path.py +++ b/IPython/utils/path.py @@ -318,7 +318,7 @@ def get_ipython_module_path(module_str): def locate_profile(profile='default'): """Find the path to the folder associated with a given profile. - I.e. find $IPYTHON_DIR/profile_whatever. + I.e. find $IPYTHONDIR/profile_whatever. """ from IPython.core.profiledir import ProfileDir, ProfileDirError try: diff --git a/docs/man/ipcluster.1 b/docs/man/ipcluster.1 index 48a7c9b..5aeeac3 100644 --- a/docs/man/ipcluster.1 +++ b/docs/man/ipcluster.1 @@ -11,7 +11,7 @@ ipcluster is a control tool for IPython's parallel computing functions. IPython cluster startup. This starts a controller and engines using various -approaches. Use the IPYTHON_DIR environment variable to change your IPython +approaches. Use the IPYTHONDIR environment variable to change your IPython directory from the default of ~/.ipython or ~/.config/ipython. The log and security subdirectories of your IPython directory will be used by this script for log files and security files. diff --git a/docs/man/ipcontroller.1 b/docs/man/ipcontroller.1 index 4c03881..3b6d8da 100644 --- a/docs/man/ipcontroller.1 +++ b/docs/man/ipcontroller.1 @@ -100,7 +100,7 @@ Default: u'/Users/minrk/.ipython' The name of the IPython directory. This directory is used for logging configuration (through profiles), history storage, etc. The default is usually $HOME/.ipython. This options can also be specified through the -environment variable IPYTHON_DIR. +environment variable IPYTHONDIR. .TP .B \-\-url= (HubFactory.url) Default: '' diff --git a/docs/man/iplogger.1 b/docs/man/iplogger.1 index 92245f8..98c0011 100644 --- a/docs/man/iplogger.1 +++ b/docs/man/iplogger.1 @@ -51,7 +51,7 @@ whether to log to a file The name of the IPython directory. This directory is used for logging configuration (through profiles), history storage, etc. The default is usually $XDG_CONFIG_HOME/ipython. This options can also be specified -through the environment variable IPYTHON_DIR. +through the environment variable IPYTHONDIR. .TP .B \-\-url= (LogWatcher.url) . diff --git a/docs/man/ipython.1 b/docs/man/ipython.1 index 48be69c..a21a3ae 100644 --- a/docs/man/ipython.1 +++ b/docs/man/ipython.1 @@ -182,7 +182,7 @@ Default: u'/Users/minrk/.ipython' The name of the IPython directory. This directory is used for logging configuration (through profiles), history storage, etc. The default is usually $HOME/.ipython. This options can also be specified through the -environment variable IPYTHON_DIR. +environment variable IPYTHONDIR. .TP .B \-\-gui= (TerminalIPythonApp.gui) Default: None diff --git a/docs/source/config/old.txt b/docs/source/config/old.txt index fe6e0bd..e166fbc 100644 --- a/docs/source/config/old.txt +++ b/docs/source/config/old.txt @@ -95,7 +95,7 @@ sequences. You can go to a 'no color' mode by typing '%colors NoColor'. You can try using a different terminal emulator program (Emacs users, see below). To permanently set your color preferences, edit the file -$IPYTHON_DIR/ipythonrc and set the colors option to the desired value. +$IPYTHONDIR/ipythonrc and set the colors option to the desired value. Object details (types, docstrings, source code, etc.) diff --git a/docs/source/config/overview.txt b/docs/source/config/overview.txt index 6837aa1..0860f13 100644 --- a/docs/source/config/overview.txt +++ b/docs/source/config/overview.txt @@ -284,7 +284,7 @@ following algorithm: * If the ``ipython_dir`` command line flag is given, its value is used. * If not, the value returned by :func:`IPython.utils.path.get_ipython_dir` - is used. This function will first look at the :envvar:`IPYTHON_DIR` + is used. This function will first look at the :envvar:`IPYTHONDIR` environment variable and then default to a platform-specific default. On posix systems (Linux, Unix, etc.), IPython respects the ``$XDG_CONFIG_HOME`` @@ -302,7 +302,7 @@ elsewhere. Once the location of the IPython directory has been determined, you need to know which profile you are using. For users with a single configuration, this will simply be 'default', and will be located in -:file:`/profile_default`. +:file:`/profile_default`. The next thing you need to know is what to call your configuration file. The basic idea is that each application has its own default configuration filename. @@ -344,7 +344,7 @@ Let's start by showing how a profile is used: This tells the :command:`ipython` command line program to get its configuration from the "sympy" profile. The file names for various profiles do not change. The only difference is that profiles are named in a special way. In the case above, -the "sympy" profile means looking for :file:`ipython_config.py` in :file:`/profile_sympy`. +the "sympy" profile means looking for :file:`ipython_config.py` in :file:`/profile_sympy`. The general pattern is this: simply create a new profile with: diff --git a/docs/source/interactive/qtconsole.txt b/docs/source/interactive/qtconsole.txt index f1f76f1..6f65002 100644 --- a/docs/source/interactive/qtconsole.txt +++ b/docs/source/interactive/qtconsole.txt @@ -400,9 +400,9 @@ generate this key, but the default is just to generate a new UUID. You can gener private key with:: # generate 1024b of random data, and store in a file only you can read: - # (assumes IPYTHON_DIR is defined, otherwise use your IPython directory) - $> python -c "import os; print os.urandom(128).encode('base64')" > $IPYTHON_DIR/sessionkey - $> chmod 600 $IPYTHON_DIR/sessionkey + # (assumes IPYTHONDIR is defined, otherwise use your IPython directory) + $> python -c "import os; print os.urandom(128).encode('base64')" > $IPYTHONDIR/sessionkey + $> chmod 600 $IPYTHONDIR/sessionkey The *contents* of this file will be stored in the JSON connection file, so that file contains everything you need to connect to and use a kernel. @@ -411,7 +411,7 @@ To use this generated key, simply specify the ``Session.keyfile`` configurable in :file:`ipython_config.py` or at the command-line, as in:: # instruct IPython to sign messages with that key, instead of a new UUID - $> ipython qtconsole --Session.keyfile=$IPYTHON_DIR/sessionkey + $> ipython qtconsole --Session.keyfile=$IPYTHONDIR/sessionkey .. _ssh_tunnels: diff --git a/docs/source/interactive/reference.txt b/docs/source/interactive/reference.txt index 48064a2..9a78c8c 100644 --- a/docs/source/interactive/reference.txt +++ b/docs/source/interactive/reference.txt @@ -26,7 +26,7 @@ the command line, simply because they are not practical here. Look into your configuration files for details on those. There are separate configuration files for each profile, and the files look like "ipython_config.py" or "ipython_config_.py". Profile directories look like -"profile_profilename" and are typically installed in the IPYTHON_DIR directory. +"profile_profilename" and are typically installed in the IPYTHONDIR directory. For Linux users, this will be $HOME/.config/ipython, and for other users it will be $HOME/.ipython. For Windows users, $HOME resolves to C:\\Documents and Settings\\YourUserName in most instances. @@ -249,7 +249,7 @@ Persistent command history across sessions IPython will save your input history when it leaves and reload it next time you restart it. By default, the history file is named -$IPYTHON_DIR/profile_/history.sqlite. This allows you to keep +$IPYTHONDIR/profile_/history.sqlite. This allows you to keep separate histories related to various tasks: commands related to numerical work will not be clobbered by a system shell history, for example. diff --git a/docs/source/interactive/shell.txt b/docs/source/interactive/shell.txt index 306db9a..a1690c7 100644 --- a/docs/source/interactive/shell.txt +++ b/docs/source/interactive/shell.txt @@ -26,7 +26,7 @@ the "pysh" shortcut in start menu. If you want to use the features of sh profile as your defaults (which might be a good idea if you use other profiles a lot of the time but still want the convenience of sh profile), add ``import ipy_profile_sh`` -to your $IPYTHON_DIR/ipy_user_conf.py. +to your $IPYTHONDIR/ipy_user_conf.py. The 'sh' profile is different from the default profile in that: diff --git a/docs/source/parallel/parallel_multiengine.txt b/docs/source/parallel/parallel_multiengine.txt index 9f035f2..f51fe41 100644 --- a/docs/source/parallel/parallel_multiengine.txt +++ b/docs/source/parallel/parallel_multiengine.txt @@ -37,7 +37,7 @@ module and then create a :class:`.Client` instance: In [2]: rc = Client() This form assumes that the default connection information (stored in -:file:`ipcontroller-client.json` found in :file:`IPYTHON_DIR/profile_default/security`) is +:file:`ipcontroller-client.json` found in :file:`IPYTHONDIR/profile_default/security`) is accurate. If the controller was started on a remote machine, you must copy that connection file to the client machine, or enter its contents as arguments to the Client constructor: