我正在运行这个:
os.system("/etc/init.d/apache2 restart")
它应该重新启动网络服务器,就像我直接从终端运行命令一样,它会输出以下内容:
* Restarting web server apache2 ...
waiting [ OK ]
但是,我不希望它在我的应用程序中实际输出。我怎样才能禁用它?谢谢!