root/branches/gajim_0.5.1/gajim.py

Revision 362, 1.2 kB (checked in by asterix, 4 years ago)

runCore.py is now name gajim.py

  • Property svn:executable set to *
  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Line 
1#!/usr/bin/env python
2##      gajim.py
3##
4## Gajim Team:
5##      - Yann Le Boulanger <asterix@lagaule.org>
6##      - Vincent Hanquez <tab@snarc.org>
7##
8##      Copyright (C) 2003-2005 Gajim Team
9##
10## This program is free software; you can redistribute it and/or modify
11## it under the terms of the GNU General Public License as published
12## by the Free Software Foundation; version 2 only.
13##
14## This program is distributed in the hope that it will be useful,
15## but WITHOUT ANY WARRANTY; without even the implied warranty of
16## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17## GNU General Public License for more details.
18##
19
20import logging
21logging.basicConfig()
22
23import common
24import Core
25
26from common import i18n
27i18n.init()
28_ = i18n._
29
30import getopt, sys
31
32def usage():
33        print "usage :", sys.argv[0], ' [OPTION]'
34        print "  -c\tlaunch Gajim as a client of a Gajim server"
35        print "  -h, --help\tdisplay this help and exit"
36
37try:
38        opts, args = getopt.getopt(sys.argv[1:], "ch", ["help"])
39except getopt.GetoptError:
40        # print help information and exit:
41        usage()
42        sys.exit(2)
43mode = 'server'
44for o, a in opts:
45        if o == '-c':
46                mode = 'client'
47        if o in ("-h", "--help"):
48                usage()
49                sys.exit()
50
51Core.core.start(mode)
52print _("Core Stopped")
Note: See TracBrowser for help on using the browser.