gregpinero at gmail.com
Tue Jun 6 23:50:46 CEST 2006
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.
So my solution is to give the tool a temporary file to write to and
then have Python read that file. I figure that's the safest way to
deal with this sort of thing. (But I'm open to better methods).
Here's my code so far, could anyone tell me the proper way to use
tempfile. This code won't let the tool write to the file because
Python has it locked. But I'm worried that if I close the file then
windows might take it away? I have no idea.
command=r'"%s" "%s" "%s"' % (PDFTOTEXTPATH,filepath,outfilename)
Chief Innovation Officer
More information about the Python-list