python - How to prevent command line return string from printing -
basically, i'm sending command so:
proc = subprocess.popen("ls",stdout=subprocess.pipe) tmpstr = proc.stdout.read()
this works fine, prints tmpstr screen, don't want. how can prevent this?
it's printing because running command typing @ interactive prompt. if put code in file , execute it, tmpstr not printed out.
Comments
Post a Comment