gramps/src/gramps.py

68 lines
1.5 KiB
Python
Raw Normal View History

2001-05-13 01:56:57 +00:00
#! /usr/bin/python -O
#-------------------------------------------------------------------------
#
# Load internationalization setup
#
#-------------------------------------------------------------------------
2001-05-13 01:56:57 +00:00
import os
import intl
import locale
2001-05-13 01:56:57 +00:00
if os.environ.has_key("GRAMPSI18N"):
loc = os.environ["GRAMPSI18N"]
2001-05-13 01:56:57 +00:00
else:
loc = "locale"
2001-05-13 01:56:57 +00:00
intl.textdomain("gramps")
intl.bindtextdomain("gramps",loc)
locale.setlocale(locale.LC_NUMERIC,"C")
2001-05-13 01:56:57 +00:00
#-------------------------------------------------------------------------
#
# Standard python modules
#
#-------------------------------------------------------------------------
import traceback
import sys
#-------------------------------------------------------------------------
#
# GNOME/GTK libraries
#
#-------------------------------------------------------------------------
import GdkImlib
import gtk
import gnome.ui
import gnome.config
#-------------------------------------------------------------------------
#
# 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:
traceback.print_exc()
2001-12-09 05:24:29 +00:00
fname = os.path.expanduser("~/gramps.err")
errfile = open(fname,"w")
traceback.print_exc(file=errfile)
errfile.close()
gtk.mainloop()
2001-12-09 05:24:29 +00:00