Is it possible to use POD(plain old documentation) with Python?

1.2k Views Asked by At

I was wondering if it is possible to use POD(plain old documentation) with Python? And how should I do it?

2

There are 2 best solutions below

0
On

There does not appear to be a directly supported way to use POD inline in a Python file. However, Python modules (including the Python standard library) are documented using reStructuredText. This is usually done using Sphinx, which produces documentation from reStructuredText-formatted docstrings. Sphinx and rst were specifically designed to fill a similar niche to POD.

0
On

Yes. Use '''.

#!/usr/bin/python3                                                                       

'''
=pod
                                                                                     
=head1 NAME
...
=cut
'''

import sys