Gabriel Genellina wrote: > I have a script starting with a docstring. After compiling it with > compile(), is there any way I could get the docstring? __doc__ on the > code object doesn't work.
The lazy coder's approach: >>> compiler.parse(""" ... 'the docstring' ... print 42 ... """).doc 'the docstring' Peter -- http://mail.python.org/mailman/listinfo/python-list