Commits

Doug Hellmann committed b660c5f

add feature list; clean up hook list; fix bug in warning message generation

  • Participants
  • Parent commits 70a687f

Comments (0)

Files changed (4)

 
 virtualenvwrapper is a set of extensions to Ian Bicking's `virtualenv <http://pypi.python.org/pypi/virtualenv>`_ tool.  The extensions include wrappers for creating and deleting virtual environments and otherwise managing your development workflow, making it easier to work on more than one project at a time without introducing conflicts in their dependencies.
 
+========
+Features
+========
+
+ 1. Organizes all of your virtual environments in one place.
+ 2. Wrappers for creating and deleting environments, including user-configurable hooks.
+ 3. Use a single command to switch between environments.
+ 4. Tab completion for commands that take a virtual environment as argument.
+
 ===========
 Quick Setup
 ===========

File docsource/hooks.rst

 Hook Scripts
 ============
 
-virtualenvwrapper adds several hook points you can use to change your settings when creating,
-deleting, or moving between environments. They are either *sourced* (allowing them to modify
-your shell environment) or run as an external program at the appropriate trigger time.
+virtualenvwrapper adds several hook points you can use to change your settings, shell environment, or other configuration values when creating, deleting, or moving between environments. They are either *sourced* (allowing them to modify your shell environment) or *run* as an external program at the appropriate trigger time.
 
-$VIRTUAL_ENV/bin/postactivate
-=============================
+Environment Hooks
+=================
 
-The ``postactivate`` script is sourced after the new environment is enabled. ``$VIRTUAL_ENV``
-refers to the new environment at the time the script runs.
+postactivate
+------------
 
-This example script for the PyMOTW environment changes the current working directory and the
-PATH variable to refer to the source tree containing the PyMOTW source.
+The ``$VIRTUAL_ENV/bin/postactivate`` script is sourced after the new environment is enabled. ``$VIRTUAL_ENV`` refers to the new environment at the time the script runs.
+
+This example script for the PyMOTW environment changes the current working directory and the PATH variable to refer to the source tree containing the PyMOTW source.
 
 ::
 
     cd $pymotw_root
     PATH=$pymotw_root/bin:$PATH
 
-$VIRTUAL_ENV/bin/predeactivate
-==============================
+predeactivate
+-------------
+
+The ``$VIRTUAL_ENV/bin/predeactivate`` script is sourced before the current environment is deactivated, and can be used to disable or clear settings in your environment. ``$VIRTUAL_ENV`` refers to the old environment at the time the script runs.
 
-The ``predeactivate`` script is source before the current environment is deactivated, and can
-be used to disable or clear settings in your environment. ``$VIRTUAL_ENV`` refers to the old
-environment at the time the script runs.
+Global Hooks
+============
 
-$WORKON_HOME/postactivate
-=============================
+postactivate
+------------
 
-The global ``postactivate`` script is sourced after the new environment is enabled and the new
-environment's postactivate is sourced (if it exists). ``$VIRTUAL_ENV`` refers to the new
-environment at the time the script runs.
+The global ``$WORKON_HOME/postactivate`` script is sourced after the new environment is enabled and the new environment's postactivate is sourced (if it exists). ``$VIRTUAL_ENV`` refers to the new environment at the time the script runs.
 
-This example script adds a space between the virtual environment name and your old PS1 by making
-use of ``_OLD_VIRTUAL_PS1``.
+This example script adds a space between the virtual environment name and your old PS1 by making use of ``_OLD_VIRTUAL_PS1``.
 
 ::
 
     PS1="(`basename \"$VIRTUAL_ENV\"`) $_OLD_VIRTUAL_PS1"
 
-$WORKON_HOME/premkvirtualenv
-=============================
+premkvirtualenv
+---------------
 
-The ``premkvirtualenv`` script is run as an external program after the virtual environment is
-created but before the current environment is switched to point to the new env. The current
-working directory for the script is ``$WORKON_HOME`` and the name of the new environment is
-passed as an argument to the script.
+The ``$WORKON_HOME/premkvirtualenv`` script is run as an external program after the virtual environment is created but before the current environment is switched to point to the new env. The current working directory for the script is ``$WORKON_HOME`` and the name of the new environment is passed as an argument to the script.
 
-$WORKON_HOME/postmkvirtualenv
-=============================
+postmkvirtualenv
+----------------
 
-The ``postmkvirtualenv`` script is sourced after the new environment is created and
-activated.
+The ``$WORKON_HOME/postmkvirtualenv`` script is sourced after the new environment is created and activated.
 
-$WORKON_HOME/prermvirtualenv
-============================
+prermvirtualenv
+---------------
 
-The ``prermvirtualenv`` script is run as an external program before the environment is
-removed. The full path to the environment directory is passed as an argument to the script.
+The ``$WORKON_HOME/prermvirtualenv`` script is run as an external program before the environment is removed. The full path to the environment directory is passed as an argument to the script.
 
-$WORKON_HOME/postrmvirtualenv
-=============================
+postrmvirtualenv
+----------------
 
-The ``postrmvirtualenv`` script is run as an external program after the environment is
-removed. The full path to the environment directory is passed as an argument to the script.
+The ``$WORKON_HOME/postrmvirtualenv`` script is run as an external program after the environment is removed. The full path to the environment directory is passed as an argument to the script.

File docsource/index.rst

 
 virtualenvwrapper is a set of extensions to Ian Bicking's `virtualenv <http://pypi.python.org/pypi/virtualenv>`_ tool.  The extensions include wrappers for creating and deleting virtual environments and otherwise managing your development workflow, making it easier to work on more than one project at a time without introducing conflicts in their dependencies.
 
+========
+Features
+========
+
+ 1. Organizes all of your virtual environments in one place.
+ 2. Wrappers for creating and deleting environments, including user-configurable hooks.
+ 3. Use a single command to switch between environments.
+ 4. Tab completion for commands that take a virtual environment as argument.
+
 ===========
 Quick Setup
 ===========

File virtualenvwrapper/__init__.py

 """virtualenvwrapper module
 """
 
-import warnings
+import os, warnings
 docs_root = os.path.join(os.path.dirname(__file__), 'docs', 'index.html')
 warnings.warn('Use virtualenvwrapper_bashrc to set up your shell environment.  See %s for details.' % docs_root)