You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README
+31-3Lines changed: 31 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -114,9 +114,32 @@ file does not exist, it will be created first.
114
114
Quickly Navigating to a virtualenv
115
115
==================================
116
116
117
-
The functions ``cdsitepackages`` and ``cdvirtualenv`` provide quick shortcuts to quickly
118
-
``cd`` into the ``site-packages`` directory of the currently-active virtualenv, and to the
119
-
root of the currently-active virtualenv, respectively.
117
+
There are two functions to provide shortcuts to navigate into the the currently-active
118
+
virtualenv.
119
+
120
+
cdvirtualenv
121
+
============
122
+
123
+
Calling ``cdvirtualenv`` changes the current working directory to the top of the virtualenv (``$VIRTUAL_ENV``). An optional argument is appended to the path, allowing navigation directly into a subdirectory.
124
+
125
+
::
126
+
127
+
$ workon pymotw
128
+
$ echo $VIRTUAL_ENV
129
+
/Users/dhellmann/.virtualenvs/pymotw
130
+
$ cdvirtualenv
131
+
$ pwd
132
+
/Users/dhellmann/.virtualenvs/pymotw
133
+
$ cdvirtualenv bin
134
+
$ pwd
135
+
/Users/dhellmann/.virtualenvs/pymotw/bin
136
+
137
+
cdsitepackages
138
+
==============
139
+
140
+
Because the exact path to the site-packages directory in the virtualenv depends on the
141
+
version of Python, ``cdsitepackages`` is provided as a shortcut for ``cdvirtualenv
142
+
lib/python${pyvers}/site-packages``.
120
143
121
144
==========
122
145
References
@@ -130,6 +153,11 @@ For more details, refer to the column published in the May 2008 issue of Python
130
153
Updates
131
154
=======
132
155
156
+
1.16
157
+
158
+
- Merged in changes to ``cdvirtualenv`` from wam and added tests and docs.
159
+
- Merged in changes to make error messages go to stderr, also provided by wam.
0 commit comments