Quote:
Originally Posted by docjc
thanks for your answer, but...
this is the line
subprocess.run("ebook-convert " + "\"file 1.epub\" " + "\"tmp.epub\" " + "> nul")
This is the result:
"Extra arguments not understood: >, nul" (of course no conversion) btw where does to comma come from?
Any hint?
Where does the comma come from???
|
subprocess.run() is not a shell. You specify arguments, stdin, stdout, and stdout as separate parameters.
See the documentation, and especially the
Frequently used arguments section. From what you say I think you want stdout=DEVNULL and stderr=DEVNULL.
IMO: supplying the arguments as a python list is a lot easier than passing them as a string with all the quotes and escaping.