Tim Michelsen schrieb:
>>> Why not simply run
>>>
>>>   print.py --help
>>>   
>>> and include the output in the rst source?
>> 
>> I would advise that as well.
> I though I could somehow capture the "print.py --help" output.
> 
> Is there any idea how this could be trapped and included automatically 
> included?

You have to execute the script -- either by importing it and calling its
"main" function with the argv set correctly, if there is such a main
function; or by executing it in a subprocess.  In the first case you can
set sys.stdout differently and capture the output, in the second case use
subprocess.Popen's stdout argument.

Georg

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to