vmm
changeset 102 485d3f7d6981
parent 95 fc008eb12186
child 113 e35755191ff3
equal deleted inserted replaced
101:0ab6f74aa165 102:485d3f7d6981
     1 #!/usr/bin/env python
     1 #!/usr/bin/env python
     2 # -*- coding: UTF-8 -*-
     2 # -*- coding: UTF-8 -*-
     3 # Copyright 2007-2008 VEB IT
     3 # Copyright 2007 - 2009, VEB IT
     4 # See COPYING for distribution information.
     4 # See COPYING for distribution information.
     5 # $Id$
       
     6 
     5 
     7 """This is the vmm main script."""
     6 """This is the vmm main script."""
     8 
     7 
     9 from VirtualMailManager.constants.VERSION import VERSION, REVISION, RELDATE
     8 from VirtualMailManager.constants.VERSION import *
    10 
       
    11 __author__ = 'Pascal Volk <p.volk@veb-it.de>'
       
    12 __version__ = VERSION
       
    13 __revision__ = 'rev '+'$Rev$'.split()[1]
       
    14 __date__ = '$Date$'.split()[1]
       
    15 
     9 
    16 import locale
    10 import locale
    17 import os
    11 import os
    18 import sys
    12 import sys
    19 import gettext
    13 import gettext
   408         w_std(_(u'Warnings:'))
   402         w_std(_(u'Warnings:'))
   409         for warning in vmm.getWarnings():
   403         for warning in vmm.getWarnings():
   410             w_std( " * %s" % warning)
   404             w_std( " * %s" % warning)
   411 
   405 
   412 def show_version():
   406 def show_version():
   413     w_std("%s, %s %s (%s %s %s)\nPython %s %s %s\n" % (__prog__, _('version'),
   407     w_std('%s, %s %s (%s %s)\nPython %s %s %s\n\n%s %s' % (__prog__,
   414         __version__, REVISION, _('from'), strftime(
   408         _('version'), __version__, _('from'), strftime(
   415             locale.nl_langinfo(locale.D_FMT), strptime(RELDATE, '%Y-%m-%d')),
   409             locale.nl_langinfo(locale.D_FMT), strptime(__date__, '%Y-%m-%d')),
   416         sys.version.split()[0], _(u'on'), os.uname()[0]))
   410         sys.version.split()[0], _(u'on'), os.uname()[0], __prog__,
       
   411         'is free software and comes with ABSOLUTELY NO WARRANTY.'))
   417 
   412 
   418 #def main():
   413 #def main():
   419 if __name__ == '__main__':
   414 if __name__ == '__main__':
   420     __prog__ = os.path.basename(sys.argv[0])
   415     __prog__ = os.path.basename(sys.argv[0])
   421     locale.setlocale(locale.LC_ALL, '')
   416     locale.setlocale(locale.LC_ALL, '')