1""" 2The Python implementation of the Zero Install injector is divided into five sub-packages: 3 4 - L{zeroinstall.cmd} contains one module for each 0install sub-command (providing the shell-scripting interface) 5 - L{zeroinstall.injector} contains most of the interesting stuff for managing feeds, keys and downloads and for selecting versions 6 - L{zeroinstall.zerostore} contains low-level code for handling the implementation cache (where unpacked packages are stored) 7 - L{zeroinstall.gtkui} contains code for making GTK user-interfaces 8 - L{zeroinstall.support} contains helper code (not really specific to Zero Install) 910@copyright: (C) 2011, Thomas Leonard11@see: U{http://0install.net}1213@var _: a function for translating strings using the zero-install domain (for use internally by Zero Install)14"""1516version='2.0'1718importsys,logging19ifsys.version_info[0]>2:20try:21fromgi.repositoryimportGObjectasgobject22exceptImportError:23gobject=None24else:25importgobject26ifgobject:27gobject.threads_init()2829logger=logging.getLogger('0install')3031# Configure some basic logging, if the caller hasn't already done so.32logging.basicConfig()3334importgettext35fromos.pathimportdirname,join3637try:38localedir=None39translation=gettext.translation('zero-install',fallback=False)40except:41localedir=join(dirname(dirname(__file__)),'share','locale')42translation=gettext.translation('zero-install',43localedir=localedir,44fallback=True)45try:46_=translation.ugettext# Python 247exceptAttributeError:48_=translation.gettext# Python 349
51"""An exception that can be reported to the user without a stack trace.52 The command-line interface's C{--verbose} option will display the full stack trace."""