Module Expr Str Import alias Import alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore NameLoad orelse Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad NameLoad body Expr Str With NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A A thread-safe wrapper for the subprocess module. N/A logging N/A subprocess N/A sys N/A threading N/A _popen_lock N/A N/A threading Lock N/A N/A N/A sys platform darwin N/A N/A _SUBPROCESS_STDIN_IS_THREAD_HOSTILE True N/A N/A _SUBPROCESS_STDIN_IS_THREAD_HOSTILE False start_process N/A N/A args input_string env cwd stdout stderr N/A None None None None N/A N/A Starts a subprocess like subprocess.Popen, but is threadsafe.

  The value of input_string is passed to stdin of the subprocess, which is then
  closed.

  Args:
    args: A string or sequence of strings containing the program arguments.
    input_string: A string to pass to stdin of the subprocess.
    env: A dict containing environment variables for the subprocess.
    cwd: A string containing the directory to switch to before executing the
        subprocess.
    stdout: A file descriptor, file object or subprocess.PIPE to use for the
        stdout descriptor for the subprocess.
    stderr: A file descriptor, file object or subprocess.PIPE to use for the
        stderr descriptor for the subprocess.

  Returns:
    A subprocess.Popen instance for the created subprocess.
   N/A _popen_lock N/A N/A N/A N/A logging debug Starting process %r with input=%r, env=%r, cwd=%r args input_string env cwd N/A p N/A N/A subprocess Popen args env env cwd cwd stdout stdout stderr stderr stdin N/A subprocess PIPE N/A _SUBPROCESS_STDIN_IS_THREAD_HOSTILE N/A N/A N/A N/A N/A p stdin write input_string N/A N/A N/A N/A p stdin close N/A N/A p stdin None N/A N/A _SUBPROCESS_STDIN_IS_THREAD_HOSTILE N/A N/A N/A N/A N/A p stdin write input_string N/A N/A N/A N/A p stdin close N/A N/A p stdin None N/A p N/A