Skip to content

Commit 291ab64

Browse files
committed
Wrap virtualenvs to 80 chars.
1 parent f29b028 commit 291ab64

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

docs/dev/virtualenvs.rst

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
Virtual Environments
22
====================
33

4-
A Virtual Environment, put simply, is an isolated working copy of Python which allows you to work on a specific project without worry of affecting other projects.
5-
6-
For example, you can work on a project which requires Django 1.3 at the same time with a project which requires Django 1.0.
4+
A Virtual Environment, put simply, is an isolated working copy of Python which
5+
allows you to work on a specific project without worry of affecting other
6+
projects.
77

8+
For example, you can work on a project which requires Django 1.3 while also
9+
maintaining a project which requires Django 1.0.
810

911
virtualenv
1012
----------
1113

12-
`virtualenv <http://pypi.python.org/pypi/virtualenv>`_ is a tool to create isolated Python environments.
14+
`virtualenv <http://pypi.python.org/pypi/virtualenv>`_ is a tool to create
15+
isolated Python environments.
1316

1417
Install it via pip::
1518

@@ -22,28 +25,34 @@ Basic Usage
2225

2326
$ virtualenv ENVIRONMENT_NAME
2427

25-
This creates a copy of Python in whichever directory you ran the command in, placing it in a folder named ``ENVIRONMENT_NAME``.
28+
This creates a copy of Python in whichever directory you ran the command in,
29+
placing it in a folder named ``ENVIRONMENT_NAME``.
2630

2731
2. To begin using the virtual environment, it needs to be activated::
2832

2933
$ source ENVIRONMENT_NAME/bin/activate
3034

31-
You can then begin installing any new modules without affecting the system default Python or other virtual environments.
35+
You can then begin installing any new modules without affecting the system
36+
default Python or other virtual environments.
3237

33-
3. If you are done working in the virtual environment for the moment, you can deactivate it::
38+
3. If you are done working in the virtual environment for the moment, you can
39+
deactivate it::
3440

3541
$ deactivate
3642

37-
This puts you back to the system's default Python interpreter with all its installed libraries.
43+
This puts you back to the system's default Python interpreter with all its
44+
installed libraries.
3845

3946
To delete a virtual environment, just delete its folder.
4047

4148
virtualenvwrapper
4249
-----------------
4350

44-
`virtualenvwrapper <http://www.doughellmann.com/projects/virtualenvwrapper/>`_ provides a set of commands which makes working with virtual environments much more pleasant. It also places all your virtual environments into one place.
51+
`virtualenvwrapper <http://www.doughellmann.com/projects/virtualenvwrapper/>`_
52+
provides a set of commands which makes working with virtual environments much
53+
more pleasant. It also places all your virtual environments into one place.
4554

46-
To install (make sure virtualenv is already installed)::
55+
To install (make sure **virtualenv** is already installed)::
4756

4857
$ pip install virtualenvwrapper
4958
$ export WORKON_HOME=~/Envs
@@ -64,8 +73,11 @@ This creates the ``ENVIRONMENT_NAME`` folder inside ``~/Envs``.
6473

6574
$ workon ENVIRONMENT_NAME
6675

67-
**virtualenvwrapper** provides tab-completion on environment names. It really helps when you have a lot of environments and have trouble remembering their names.
68-
``workon`` also deactivates whatever environment you are currently in, so you can quickly switch between environments.
76+
**virtualenvwrapper** provides tab-completion on environment names. It really
77+
helps when you have a lot of environments and have trouble remembering their
78+
names.
79+
``workon`` also deactivates whatever environment you are currently in, so you
80+
can quickly switch between environments.
6981

7082
3. Deactivating is still the same::
7183

@@ -81,12 +93,13 @@ Other nifty commands include:
8193
List all of the environments.
8294

8395
``cdvirtualenv``
84-
Navigate into the directory of the currently activated virtual environment, so you can browse its ``site-packages``, for example.
96+
Navigate into the directory of the currently activated virtual environment,
97+
so you can browse its ``site-packages``, for example.
8598

8699
``cdsitepackages``
87100
Like the above, but directly into ``site-packages`` directory.
88101

89102
``lssitepackages``
90103
Shows contents of ``site-packages`` directory.
91104

92-
Full list of commands can be found `here <http://www.doughellmann.com/docs/virtualenvwrapper/command_ref.html#managing-environments>`_.
105+
A full list of commands can be found `here <http://www.doughellmann.com/docs/virtualenvwrapper/command_ref.html#managing-environments>`_.

0 commit comments

Comments
 (0)