gramps/src/gramps.py

62 lines
1.3 KiB
Python
Raw Normal View History

2002-10-20 19:55:16 +05:30
#! /usr/bin/python -O
import const
import sys
import os
import locale
import intl
#-------------------------------------------------------------------------
#
# Cope with versioned pygtk installation.
#
#-------------------------------------------------------------------------
try:
import pygtk
pygtk.require('2.0')
except ImportError:
pass
import gtk
2002-10-20 19:55:16 +05:30
#-------------------------------------------------------------------------
#
# Load internationalization setup
#
#-------------------------------------------------------------------------
if os.environ.has_key("GRAMPSI18N"):
loc = os.environ["GRAMPSI18N"]
else:
loc = "locale"
#-------------------------------------------------------------------------
#
# gramps libraries
#
#-------------------------------------------------------------------------
import gramps_main
import const
2002-10-20 19:55:16 +05:30
if len(sys.argv) > 1:
arg = sys.argv[1]
else:
arg = None
intl.bindtextdomain("gramps",loc)
intl.bind_textdomain_codeset("gramps",'UTF-8')
intl.textdomain("gramps")
locale.setlocale(locale.LC_NUMERIC,"C")
2002-10-20 19:55:16 +05:30
try:
import StartupDialog
if StartupDialog.need_to_run():
StartupDialog.StartupDialog(gramps_main.Gramps,arg)
else:
gramps_main.Gramps(arg)
except:
import DisplayTrace
DisplayTrace.DisplayTrace()
gtk.mainloop()