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

All Samples(51)  |  Call(44)  |  Derive(0)  |  Import(7)

src/g/r/gramps-3.4.2/src/plugins/Records.py   Gramps(Download)
#
#------------------------------------------------------------------------
from gen.lib import ChildRefType, Date, EventType, Name, StyledText, \
        StyledTextTag, StyledTextTagType
from gen.plug.docgen import FontStyle, ParagraphStyle, FONT_SANS_SERIF, \
    # Make a copy of the name object so we don't mess around with the real
    # data.
    n = Name(source=name)
 
    # Insert placeholders.

src/g/r/gramps-3.4.2/src/plugins/lib/libgedcom.py   Gramps(Download)
    def __parse_name_personal(text):
        """
        Parses a GEDCOM NAME value into an Name structure
        """
        name = gen.lib.Name()
        data = text.split()
        if len(data) == 1:
            name = gen.lib.Name(state.person.primary_name)
            surn = gen.lib.Surname()
            surn.set_surname(data[0].strip())
            state.person.add_attribute(attr)
        else:
            name = gen.lib.Name()
            surname = gen.lib.Surname()
            surname.set_surname(lname[-1].strip())
        data = text.split()
        if len(data) == 1:
            name = gen.lib.Name(state.person.primary_name)
            surn = gen.lib.Surname()
            surn.set_surname(data[0].strip())

src/g/r/gramps-3.4.2/src/plugins/drawreport/Calendar.py   Gramps(Download)
        if maiden_name is not None:
            if married_name is not None:
                name = gen.lib.Name(married_name)
            else:
                name = gen.lib.Name(primary_name)
                surname = gen.lib.Surname()
                surname.set_surname(maiden_name)
                name.set_surname_list([surname])
        else:
            name = gen.lib.Name(primary_name)

src/g/r/gramps-3.4.2/src/gen/proxy/private.py   Gramps(Download)
#
#-------------------------------------------------------------------------
from gen.lib import (MediaRef, Attribute, Address, EventRef, 
                     Person, Name, Source, RepoRef, MediaObject, Place, Event, 
                     Family, ChildRef, Repository, LdsOrd, Surname, Citation)
    @rtype: Name
    """
    new_name = Name()
    new_name.set_group_as(name.get_group_as())
    new_name.set_sort_as(name.get_sort_as())
    if (name and name.get_privacy()) or (person and person.get_privacy()):
        # Do this so a person always has a primary name of some sort.
        name = Name()
        surn = Surname()
        surn.set_surname(_('Private'))

src/g/r/gramps-3.4.2/src/plugins/textreport/BirthdayReport.py   Gramps(Download)
from gen.display.name import displayer as global_name_display
from Errors import ReportError
from gen.lib import NameType, EventType, Name, Date, Person, Surname
import Relationship
from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
        if maiden_name is not None:
            if married_name is not None:
                name = Name(married_name)
            else:
                name = Name(primary_name)
                surname_obj = name.get_primary_surname()
                surname_obj.set_surname(maiden_name)
        else:
            name = Name(primary_name)

src/g/r/gramps-3.4.2/src/plugins/webreport/NarrativeWeb.py   Gramps(Download)
        if maiden_name is not None:
            if married_name is not None:
                name = gen.lib.Name(married_name)
            else:
                name = gen.lib.Name(primary_name)
                surname_obj = name.get_primary_surname()
                surname_obj.set_surname(maiden_name)
        else:
            name = gen.lib.Name(primary_name)

src/g/r/gramps-3.4.2/src/plugins/webreport/WebCal.py   Gramps(Download)
        if maiden_name is not None:
            if married_name is not None:
                name = gen.lib.Name(married_name)
            else:
                name = gen.lib.Name(primary_name)
                surname_obj = name.get_primary_surname()
                surname_obj.set_surname(maiden_name)
        else:
            name = gen.lib.Name(primary_name)

src/g/r/gramps-3.4.2/src/plugins/import/ImportGeneWeb.py   Gramps(Download)
        LOG.debug("Person: %s %s" % (firstname, surname))
        person = self.get_or_create_person(firstname,surname)
        name = gen.lib.Name()
        name.set_type( gen.lib.NameType(gen.lib.NameType.BIRTH))
        name.set_first_name(firstname)
            name.set_type(gen.lib.NameType(gen.lib.NameType.BIRTH))
            person.add_alternate_name(name)
            name = gen.lib.Name()
            name.set_type(gen.lib.NameType(gen.lib.NameType.AKA))
            name.set_first_name(public_name)
 
        for aka in firstname_aliases:
            name = gen.lib.Name()
            name.set_type(gen.lib.NameType(gen.lib.NameType.AKA))
            name.set_first_name(aka)
 
        for aka in name_aliases:
            name = gen.lib.Name()
            name.set_type(gen.lib.NameType(gen.lib.NameType.AKA))
            name.set_first_name(aka)
 
        for aka in surname_aliases:
            name = gen.lib.Name()
            name.set_type(gen.lib.NameType(gen.lib.NameType.AKA))
            if public_name:

src/g/r/gramps-3.4.2/src/plugins/import/ImportProGen.py   Gramps(Download)
                patronym = recflds[patron_ix]
 
                name = gen.lib.Name()
                name.set_type(gen.lib.NameType.BIRTH)
                sname = gen.lib.Surname()
                    else:
                        # ???? Don't know if this is OK.
                        name = gen.lib.Name()
                        sname = gen.lib.Surname()
                        sname.set_surname(aname[-1].strip())

src/g/r/gramps-3.4.2/src/gui/editors/editfamily.py   Gramps(Download)
    def north_american(self):
        """
        Child inherits name from father
        """
        name = gen.lib.Name()
    def no_name(self):
        name = gen.lib.Name()
        #the editor requires a surname
        name.add_surname(gen.lib.Surname())
        name.set_primary_surname(0)
    def latin_american(self):
        """
        Child inherits name from father and mother
        """
        name = gen.lib.Name()
                preset_name(father, name)
            #we take first surname, and keep that
            mothername = gen.lib.Name()
            preset_name(mother, mothername)
            preset_name(father, name)
    def no_name(self):
        """
        Default surname guess.
        """
        name = gen.lib.Name()

  1 | 2 | 3  Next