root/branches/gajim_0.6/gajim.py

Revision 472, 1.3 kB (checked in by nk, 3 years ago)

removal of accounts from (contact) Information; sep in edit menu above preferences

  • 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
31import sys
32import signal
33
34def usage():
35        print "usage :", sys.argv[0], ' [OPTION]'
36        print "  -c\tlaunch Gajim as a client of a Gajim server"
37        print "  -h, --help\tdisplay this help and exit"
38
39try:
40        opts, args = getopt.getopt(sys.argv[1:], "ch", ["help"])
41except getopt.GetoptError:
42        # print help information and exit:
43        usage()
44        sys.exit(2)
45mode = 'server'
46for o, a in opts:
47        if o == '-c':
48                mode = 'client'
49        if o in ("-h", "--help"):
50                usage()
51                sys.exit()
52
53# ^C exits the application
54signal.signal(signal.SIGINT, signal.SIG_DFL)
55
56Core.core.start(mode)
57print _("Core Stopped")
Note: See TracBrowser for help on using the browser.