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

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

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -