sys.argv[0] = 'sonata' # apply as well: try: import ctypes libc = ctypes.CDLL('libc.so.6') PR_SET_NAME = 15 libc.prctl(PR_SET_NAME, sys.argv[0], 0, 0, 0) except Exception: # if it fails, it fails pass ## Apply locale and translation: from sonata import misc misc.setlocale() # let gettext install _ as a built-in for all modules to see # XXX what's the correct way to find the localization? try: gettext.install('sonata', os.path.join(sonata.__file__.split('/lib')[0], 'share', 'locale'), unicode=1) except: print "Warning: trying to use an old translation" gettext.install('sonata', '/usr/share/locale', unicode=1) gettext.textdomain('sonata') ## Check initial dependencies: # Test python version: if sys.version_info < (2,5):