8.1.2 How do I load multiple pedigrees in one program?

A PyPedal program can load more than one pedigree at a time. Each pedigree must be passed its own options dictionary, and the pedigrees must have different names. This is easily done by creating a dictionary with global options and customizing it for each pedigree. Once you have created a pedigree by calling pyp_newclasses.NewPedigree('options') you can change the options dictionary without affecting that pedigree (a pedigree stores a copy of the options dictionary in its kw attribute). The following code fragment demonstrates how to read two pedigree files in a single program:
#   Create the empty options dictionary
options = {}

#   Read the first pedigree
options['pedfile'] = 'new_lacy.ped'
options['pedformat'] = 'asd'
options['pedname'] = 'Lacy Pedigree'
example1 = pyp_newclasses.loadPedigree(options)

#   Read the second pedigree
options['pedfile'] = 'new_boichard.ped'
options['pedformat'] = 'asdg'
options['pedname'] = 'Boichard Pedigree'
example2 = pyp_newclasses.loadPedigree(options)
Note that pedformat only needs to be changed if the two pedigrees have different formats. You do not even have to change pedfile.

See About this document... for information on suggesting changes.