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

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -