例如,当安装lirc包时,它会显示配置对话框屏幕。如何自动选择默认值(或可能提供特定值)并继续?你知道吗
现在我有一个简单的脚本:
#!/usr/bin/env python
import apt
import sys
pkg_name = "lirc"
cache = apt.cache.Cache()
cache.update()
pkg = cache[pkg_name]
if pkg.is_installed:
print "{pkg_name} already installed".format(pkg_name=pkg_name)
else:
pkg.mark_install()
try:
cache.commit()
except Exception, arg:
print >> sys.stderr, "Sorry, package installation failed [{err}]".format(err=str(arg))
配置窗口如下链接所示 http://cdn.avsforum.com/d/db/db48d778_vbattach158986.jpeg
目前没有回答
相关问题 更多 >
编程相关推荐