Just in case anyone else finds it useful, to be precise I use:
if opts.man:
p1 = Popen(["echo", __doc__], stdout=PIPE)
p2 = Popen(["pod2man"], stdin=p1.stdout, stdout=PIPE)
p3 = Popen(["nroff","-man"], stdin=p2.stdout, stdout=PIPE)
output = p3.communicate()[0]
print outputinside the def main().
signature.asc
Description: Digital signature
-- http://mail.python.org/mailman/listinfo/python-list
