daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Oct 11th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sample.py contains following
  2.     def run_cmd(self, cmd):
  3.         self.logger.debug("Running command : %s" % cmd)
  4.         process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
  5.                                    stderr=subprocess.PIPE)
  6.  
  7.     cmd = "source .x-venv/bin/activate; "
  8.     run_cmd(cmd)
  9.     call_do_something()
  10.  
  11. And sample.py is invoked as
  12. # source .y-venv/bin/activate
  13. will the call_do_something be executed in x-venv or y-venv.
  14. Just to make things more complicated lets say y-venv is a python2 venv and x-venv is a python3 venv
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top