Simple convenience function to extract docstring
Project description
Simple convenience function to extract docstring
Examples
Print the first line of a docstring:
>>> import gleandoc
>>> docstring = gleandoc.docstring('re')
>>> docstring.splitlines()[0]
'Support for regular expressions (RE).'
>>>
Do the same thing from the command line:
$ gleandoc re | head -1
Support for regular expressions (RE).
$
Features
No dependencies
Limitations
Embedded backslash-n newlines are treated as actual newlines
Relies on various pseudo-internals: locals(), exec()
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gleandoc-0.1.0.tar.gz
(11.2 kB
view hashes)