python - subprocess module: using the call method with tempfile objects -


I have created temp designated files, the NamedTemporaryFile method with templatefile libraries I've written to them buffers fly, and I did not turn them off

I'm trying to use the subprocess module to call some shell commands

subprocess.call ('cat% s'% f.name) always says that the named temporary file does not exist.

os.path.exists (f.name) always gives the right I can run the cat command directly from the file.

Is there any reason that the subprocess module will not work with the temporary files?

Can you do this work? Shell = Using the correct option for subprocesses?


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -