Is it possible to save or store the return value of a subprocess.Popen() to a global variable? For example,
global_var = none
 ...
 def some_function():
    p = subprocess.Popen(...,stdout=subprocess.PIPE, shell=True)
    global_var = p
 def some_function_2():
    x = global_var.stdout
Something like this. I'm essentially trying to read output from a subprocess that is started earlier in code but I need to begin the read later on.
 
    