Skip to content

Instantly share code, notes, and snippets.

@kantlivelong
Created January 9, 2018 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kantlivelong/8fec1fa9df1a2d8af42cd72f071e868e to your computer and use it in GitHub Desktop.
Save kantlivelong/8fec1fa9df1a2d8af42cd72f071e868e to your computer and use it in GitHub Desktop.
p = subprocess.Popen(shlex.split(cmd_line), shell=True)
self._logger.debug("command executed. PID=%s, Command=%s" % (p.pid, cmd_line))
while p.poll() is None:
time.sleep(0.1)
r = p.returncode
self._logger.debug("returned: %s" % r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment