Skip to content

Commit ae763e6

Browse files
committed
[doc/tutorial] Add 'pprint' description
1 parent 9cab721 commit ae763e6

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

doc/tutorial.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ following command::
311311
As expected from the Document printout our example contains two Sections. The
312312
printout and attributes of a Section are explained in the next chapter.
313313

314-
315314
The Sections
316315
------------
317316

@@ -553,6 +552,18 @@ returned list will have no affect on the actual Property values. If you want to
553552
make changes to a Property value, either use the ``append``, ``extend`` and ``remove``
554553
methods or assign a new value list to the property.
555554

555+
Printing overviews to navigate the contents of an odML document
556+
---------------------------------------------------------------
557+
558+
The odML entities ``Property``, ``Section`` and ``Document`` feature
559+
a method that allows to print a tree-like representation of
560+
all child entities to get an overview of the file structure.
561+
562+
>>> MYodML.pprint()
563+
>>> sec = MYodML['TheCrew']
564+
>>> sec.pprint()
565+
>>> prop = odmlEX['TheCrew'].properties['NameCrewMembers']
566+
>>> prop.pprint()
556567

557568
-------------------------------------------------------------------------------
558569

0 commit comments

Comments
 (0)