hidden - Hide echo from apt-get in python -


how can hide process of installing java (apt-get openjdk-6-jre) when it's runned in python? can replace "installing java..." till it's ready.

thanks in advance.

here's implementation of @khachik's comment:

import os subprocess import stdout, check_call  check_call(['apt-get', 'install', 'openjdk-6-jre'],             stdout=open(os.devnull,'wb'), stderr=stdout) 

it raises exception in case of error.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -