def getp(o, property=None):
insp = ArtistInspector(o)<EOL>if property is None:<EOL><INDENT>ret = insp.pprint_getters()<EOL>print('<STR_LIT:\n>'.join(ret))<EOL>return<EOL><DEDENT>func = getattr(o, '<STR_LIT>' + property)<EOL>return func()<EOL>
Return the value of handle property.  property is an optional string
for the property you want to return

Example usage::

    getp(o)  # get all the object properties
    getp(o, 'linestyle')  # get the linestyle property

*o* is a :class:`Artist` instance, eg
:class:`~matplotllib.lines.Line2D` or an instance of a
:class:`~matplotlib.axes.Axes` or :class:`matplotlib.text.Text`.
If the *property* is 'somename', this function returns

  o.get_somename()

:func:`getp` can be used to query all the gettable properties with
``getp(o)``. Many properties have aliases for shorter typing, e.g.
'lw' is an alias for 'linewidth'.  In the output, aliases and full
property names will be listed as:

  property or alias = value

e.g.:

  linewidth or lw = 2