def exec_command(*cmdargs, **kwargs):
 encoding = kwargs.pop('encoding', None)
 out = subprocess.Popen(cmdargs, stdout=subprocess.PIPE, **kwargs).communicate()[0]
 if is_py3:
  if encoding:
   out = out.decode(encoding)
  else:
   out = os.fsdecode(out)
 return out

def exec_command ( * cmdargs , ** kwargs ) : encoding = kwargs . pop ( 'encoding' , None ) out = subprocess . Popen ( cmdargs , stdout = subprocess . PIPE , ** kwargs ) . communicate ( ) [ 0 ] if is_py3 : if encoding : out = out . decode ( encoding ) else : out = os . fsdecode ( out ) return out
run the command specified by the passed positional arguments .