Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/g/r/gramps-3.4.2/src/plugins/import/ImportXml.py   Gramps(Download)
    def start_surname(self, attrs):
        self.surname = gen.lib.Surname()
        self.surname.set_prefix(attrs.get("prefix", ""))
        self.surname.set_primary(attrs.get("prim", "1") == "1")
        self.surname.set_connector(attrs.get("connector", ""))

src/g/r/gramps-3.4.2/src/plugins/lib/libgedcom.py   Gramps(Download)
            surn = gen.lib.Surname()
            surn.set_surname(names[0].strip())
            surn.set_primary()
            name.set_surname_list([surn])
        else:
                surn = gen.lib.Surname()
                surn.set_surname(names[2].strip())
                surn.set_primary()
                name.set_surname_list([surn])
                name.set_suffix(names[4].strip())
            surn = gen.lib.Surname()
            surn.set_prefix(line.data.strip())
            surn.set_primary()
            state.name.set_surname_list([surn])
        self.__skip_subordinate_levels(state.level+1, state)
            surn = gen.lib.Surname()
            surn.set_surname(line.data.strip())
            surn.set_primary()
            state.name.set_surname_list([surn])
        self.__skip_subordinate_levels(state.level+1, state)
            surn = gen.lib.Surname()
            surn.set_surname(data[0].strip())
            surn.set_primary()
            name.set_surname_list([surn])
            name.set_type(gen.lib.NameType.MARRIED)