4 Feb
2014
4 Feb
'14
3:05 p.m.
On 5 February 2014 00:33, Vinay Sajip <vinay_sajip@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 | ncoghlan@gmail.com | Brisbane, Australia