running in a virtualenv

A

Andrea Crotti

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top