Skip to content

Tag: subprocess

(py2.7) long “echo” via subprocess

I’m starting to write some python code to initiate new servers/VM(s) with proxy servers This hasn’t been working due to syntax error so I tried dividing n into But still this syntax error? Thanks! I’ve tried many combinations of ‘ and ” but no luck. Answer The problem is “e…

How to pass variables in parent to subprocess in python?

I am trying to have a parent python script sent variables to a child script to help me speed-up and automate video analysis. I am now using the subprocess.Popen() call to start-up 6 instances of a child script but cannot find a way to pass variables and modules already called for in the parent to the child. F…

running multiple bash commands with subprocess

If I run echo a; echo b in bash the result will be that both commands are run. However if I use subprocess then the first command is run, printing out the whole of the rest of the line. The code below echos a; echo b instead of a b, how do I get it to run both commands? Answer