parameters: (cmd)
docstring: Execute the external command and get its exitcode, stdout and stderr.
docstring_summary: Execute the external command and get its exitcode, stdout and stderr.
docstring_tokens: Execute the external command and get its exitcode stdout and stderr .
function: def exec_cmd(cmd):
      """
      Execute the external command and get its exitcode, stdout and stderr.
      """
      args = shlex.split(cmd)
  
      proc = Popen(args, stdout=PIPE, stderr=PIPE)
      out, err = proc.communicate()
      exitcode = proc.returncode
  
      print(out)
      print(err)
      sys.stdout.flush()
      assert(exitcode == 0)
function_tokens: def exec_cmd ( cmd ) : args = shlex . split ( cmd ) proc = Popen ( args , stdout = PIPE , stderr = PIPE ) out , err = proc . communicate ( ) exitcode = proc . returncode print ( out ) print ( err ) sys . stdout . flush ( ) assert ( exitcode == 0 )