Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19482 > unrolled thread
| Started by | Andrea Crotti <andrea.crotti.0@gmail.com> |
|---|---|
| First post | 2012-01-26 11:16 +0000 |
| Last post | 2012-01-26 11:16 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
running in a virtualenv Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-01-26 11:16 +0000
| From | Andrea Crotti <andrea.crotti.0@gmail.com> |
|---|---|
| Date | 2012-01-26 11:16 +0000 |
| Subject | running in a virtualenv |
| Message-ID | <mailman.5118.1327576596.27778.python-list@python.org> |
I have a python script which has to run some other code and to separate
the different projects I'm
using virtualenv.
What my this script does is:
- check if the virtualenv exists already, otherwise create it with
virtualenv.create_environment(venv_path, site_packages=True,
unzip_setuptools=False,
never_download=True)
- generate the right command to call and use
check_call(['virtualenv_interpreter', 'command', 'to', 'run']) to
execute the
whole thing inside the virtual environment.
It works fine, but for example debugging doesn't work very after the
check_call is called.
Is there a better way or maybe is it possible to change the
sys.executable at run-time?
Or in general how do I debug/profile python subprocesses?
Thanks,
Andrea
Back to top | Article view | comp.lang.python
csiph-web