gramps/gramps2/src/gramps.py
Don Allingham 4cd7010bcb Removed unneeded pygtk calls
svn: r1210
2002-11-27 05:56:23 +00:00

74 lines
1.7 KiB
Python
Executable File

#! /usr/bin/python -O
#-------------------------------------------------------------------------
#
# Cope with versioned pygtk installation.
#
#-------------------------------------------------------------------------
try:
import pygtk
pygtk.require('2.0')
except ImportError:
pass
#-------------------------------------------------------------------------
#
# Load internationalization setup
#
#-------------------------------------------------------------------------
import os
import locale
import gtk.glade
import intl
if os.environ.has_key("GRAMPSI18N"):
loc = os.environ["GRAMPSI18N"]
else:
loc = "locale"
intl.bindtextdomain("gramps",loc)
intl.bind_textdomain_codeset("gramps",'UTF-8')
intl.textdomain("gramps")
locale.setlocale(locale.LC_NUMERIC,"C")
#-------------------------------------------------------------------------
#
# Standard python modules
#
#-------------------------------------------------------------------------
import sys
#-------------------------------------------------------------------------
#
# GNOME/GTK libraries
#
#-------------------------------------------------------------------------
import gtk
import gnome.ui
#-------------------------------------------------------------------------
#
# gramps libraries
#
#-------------------------------------------------------------------------
import gramps_main
if len(sys.argv) > 1:
arg = sys.argv[1]
else:
arg = None
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()