From 8fcd6fe4464395a4264d121b9b159aa315ea3907 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 17 Jan 2006 03:52:25 +0000 Subject: [PATCH] * src/GrampsDb/_ReadGedcom.py: optimize UI updates, add test code svn: r5771 --- gramps2/src/GrampsDb/_ReadGedcom.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gramps2/src/GrampsDb/_ReadGedcom.py b/gramps2/src/GrampsDb/_ReadGedcom.py index 52ffb0104..49c807829 100644 --- a/gramps2/src/GrampsDb/_ReadGedcom.py +++ b/gramps2/src/GrampsDb/_ReadGedcom.py @@ -2151,5 +2151,17 @@ def create_id(): if __name__ == "__main__": import sys + import profile + import const + from GrampsDb import gramps_db_factory, gramps_db_reader_factory - a = NoteParser(sys.argv[1],False) + + codeset = None + + db_class = gramps_db_factory(const.app_gramps) + database = db_class() + database.load("test.grdb",lambda x: None, mode="w") + statusTop = gtk.glade.XML('GrampsDb/gedcomimport.glade',"status","gramps") + np = NoteParser(sys.argv[1],False) + g = GedcomParser(database,sys.argv[1],statusTop, codeset, np.get_map(),np.get_lines()) + profile.run('g.parse_gedcom_file(False)')