root/branches/gajim_0.6.1/gajim.py

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

gajim.sh --> gajim.py, adding psyco support if available, small fix in new message dialog if @ is not given

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