|
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 | |
|---|
| 2 | ''':' |
|---|
| 3 | exec python -OOtt "$0" ${1+"$@"} |
|---|
| 4 | ' ''' |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | import logging |
|---|
| 23 | logging.basicConfig() |
|---|
| 24 | |
|---|
| 25 | import common |
|---|
| 26 | import Core |
|---|
| 27 | |
|---|
| 28 | from common import i18n |
|---|
| 29 | i18n.init() |
|---|
| 30 | _ = i18n._ |
|---|
| 31 | |
|---|
| 32 | import getopt |
|---|
| 33 | import sys |
|---|
| 34 | import signal |
|---|
| 35 | |
|---|
| 36 | def 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 | |
|---|
| 41 | try: |
|---|
| 42 | opts, args = getopt.getopt(sys.argv[1:], "ch", ["help"]) |
|---|
| 43 | except getopt.GetoptError: |
|---|
| 44 | |
|---|
| 45 | usage() |
|---|
| 46 | sys.exit(2) |
|---|
| 47 | mode = 'server' |
|---|
| 48 | for o, a in opts: |
|---|
| 49 | if o == '-c': |
|---|
| 50 | mode = 'client' |
|---|
| 51 | if o in ("-h", "--help"): |
|---|
| 52 | usage() |
|---|
| 53 | sys.exit() |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | signal.signal(signal.SIGINT, signal.SIG_DFL) |
|---|
| 57 | |
|---|
| 58 | Core.core.start(mode) |
|---|
| 59 | print _("Core Stopped") |
|---|
| 60 | |
|---|