code: def launch(program, sock, stderr=True, cwd=None, env=None):
          
          if stderr is True:
              err = sock # redirect to socket
          elif stderr is False:
              err = open(os.devnull, 'wb') # hide
          elif stderr is None:
              err = None # redirect to console
  
          p = subprocess.Popen(program,
                  shell=type(program) not in (list, tuple),
                  stdin=sock, stdout=sock, stderr=err,
                  cwd=cwd, env=env,
                  close_fds=True)
  
          sock.close()
          return p
docs: A static method for launching a process that is connected to a given
          socket. Same rules from the Process constructor apply.