On 5 February 2014 00:33, Vinay Sajip <vinay_sa...@yahoo.co.uk> wrote:
> def main():
>     if '-e' found in sys.argv:
>         validate the passed parameter, prepare a new command line
>         using the interpreter from the venv and the sys.argv passed in,
>         but minus the -e bit, since we've dealt with that here
>         call subprocess with that command line (the restart)
>         return - our work here is done
>     # Do stuff with sys.argv

That only works if the system site packages is configured to be
visible inside the virtual environment - it usually isn't these days.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to