tempfile Question

John Machin sjmachin at lexicon.net
Tue Jun 6 20:22:00 EDT 2006


On 7/06/2006 7:50 AM, Gregory Piñero wrote:
> Hey group,
> 
> I have a command line tool that I want to be able to call from a
> Python script.  The problem is that this tool only writes to a file.
> 

Another Fantastic Manual gives another idea:
"""
        Pdftotext  reads the PDF file, PDF-file, and writes a text
        file, text-file.  If text-file is not specified, pdftotext
        converts  file.pdf  to file.txt.  If text-file is '-', the
        text is sent to stdout.
"""

Why not try reading back the child process's stdout? I would have 
thought there would be no shortage of examples and help for this idea ...

Cheers,
John



More information about the Python-list mailing list