Skip to content
Snippets Groups Projects
Commit 6764281d authored by Holger Dinkel's avatar Holger Dinkel
Browse files

add schedule; virtualenv files

parents
No related branches found
No related tags found
No related merge requests found
- 19.01.2012 Holger Dinkel: os,sys module
- 26.01.2012 Peter Jehl: subprocess module
- 02.02.2012 Robert Weatheritt: Logging module
- 22.02.2012 Bory Uyar: Profiling [Uyar_profiler.tgz files/Uyar_profiler.tgz]
- 05.04.2012 Holger Dinkel: remote debugging using pydevd
- 12.04.2012 IDEs
- 19.04.2012 Code Review Daniel Mende, Pylint Holger
- 26.04.2012 Holger Dinkel: virtualenv, contextlib
- 14.06.2012 Daniel Mende: Numpy Matrices
- 17.07.2012 Markus Fritz: "Iterators and Generators"
- 24.08.2012 Sean Powell: Python Style Guide, Zen of Python
- 30.08.2012 Holger Dinkel: vim
- 04.10.2012 Daniel Mende: argparse
- 18.10.2012 Holger Dinkel; Discussion Python programming course (Bora, Markus and Sean offered help on course, maybe each doing one day; need to define outline)
- 01.11.2012 Daniel Mende: ???
- 15.11.2012 Markus Fritz: I/O
- 13.12.2012 Holger Dinkel: Doctest, Unittest
- 20.12.2012 All: Rosalind
- 10.01.2013 Markus Fritz: Rosalind Hamm, Subs
- 24.01.2013 All: Rosalind ???
- 28.03.2013 Discussion
- 26.09.2013 Daniel Mende: Exceptions
- 04.11.2013 Holger Dinkel: Django intro
- 22.01.2014 Holger Dinkel: multiprocessing.dummy.Pool; Petr Strnad: home-made parallelization wrapper
File added
VirtualEnv
Holger Dinkel, EPUG
Version 1.3, %%date(%d.%m.%Y)
%!include(html): SITEPATH/menu_t2t
+Installation+
Install PIP:
```
wget http://pypi.python.org/pypi/pip/1.1#downloads
tar xzf pip-1.1.tar.gz
cd pip-1.1
python setup.py install
```
Install virtualenv, virtualenvwrapper:
```
pip install virtualenv virtualenvwrapper
```
Show installed packages:
```
pip freeze
```
Use requirements files to install exactly the correct versions:
```
pip freeze > requirements.txt
pip install -r requirements.txt
```
read http://www.doughellmann.com/projects/virtualenvwrapper/
read http://virtualenvwrapper.readthedocs.org/en/latest/index.html
+Usage+
++VirtualenvWrapper++
Features:
+ Organizes all of your virtual environments in one place.
+ Wrappers for managing your virtual environments (create, delete, copy).
+ Use a single command to switch between environments.
+ Tab completion for commands that take a virtual environment as argument.
+ User-configurable hooks for all operations (see Per-User Customization).
+ Plugin system for more creating sharable extensions (see Extending Virtualenvwrapper).
Usage:
create directory to hold your environments:
```
mkdir $WORKON_HOME
```
Then create the Variable WORKON_HOME and source the wrapper script
(it's a good idea to put this into your bashrc):
```
export WORKON_HOME=~/virtualenv
source /usr/local/bin/virtualenvwrapper.sh
```
create a new virtual environment:
```
mkvirtualenv test_environment
```
switch to an existing virtual environment:
```
workon test_envirnoment
```
stop using an environment:
```
deactivate
```
show all environments that exist in folder $WORKON_HOME:
```
lsvirtualenv
```
change into the directory of an environment:
```
cdvirtualenv <env>
```
You can go crazy on customizing the individual scripts for each environment:
in file WORKON_HOME/<ENV>/bin/postactivate
```
export OLD_VIRTUAL_ENV=$PWD
cd $VIRTUAL_ENV/bin
```
in file $WORKON_HOME/<ENV>/bin/postdeactivate
```
cd $OLD_VIRTUAL_ENV
```
%!include(html): SITEPATH/footer_t2t
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment