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

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -