Person class
Person class
Represents individual (a person) bibliography source contributor.
Constructors
Name | Description |
---|---|
Person(last, first, middle) | Initialize a new instance of the Person class. |
Properties
Name | Description |
---|---|
first | Gets or sets the first name of a person. |
last | Gets or sets the last name of a person. |
middle | Gets or sets the middle name of a person. |
Examples
Shows how to get bibliography sources available in the document.
document = aw.Document(MY_DIR + 'Bibliography sources.docx')
bibliography = document.bibliography
self.assertEqual(12, len(bibliography.sources))
source = bibliography.sources[0]
self.assertEqual('Book 0 (No LCID)', source.title)
authors = source.contributors.author.as_person_collection()
self.assertEqual(2, authors.count)
person = authors[0]
self.assertEqual('Roxanne', person.first)
self.assertEqual('Brielle', person.middle)
self.assertEqual('Tejeda', person.last)
See Also
- module aspose.words.bibliography