mintmenu/usr/lib/linuxmint/mintMenu/plugins/get_apt_cache.py
James Lu d004409af9 Coerse shebangs to #!/usr/bin/python2
Arch Linux's default "python" install points to Python 3, and mintmenu is certainly not compatible with it!

Closes #134.
2015-06-25 17:44:30 -07:00

17 lines
480 B
Python
Executable File

#!/usr/bin/python2
import apt, sys
try:
cache = apt.Cache()
for pkg in cache:
if not pkg.is_installed:
name = pkg.name
summary = pkg.candidate.summary.capitalize()
description = pkg.candidate.description.replace("\n", "~~~")
print "CACHE" + "###" + str(name) + "###" + str(summary) + "###" + str(description)
except Exception, detail:
print "ERROR###ERROR###ERROR###ERROR"
print detail
sys.exit(1)