Trouble with os.system

Cpa cp.astolfi at gmail.com
Wed Feb 3 12:47:08 EST 2010


Hi there,

I'm having some trouble with os.system on Fedora 12.
I have a bunch of .tex files in tmp/ and I want to compile them.
In my shell, the following commands work perfectly : 'for file in tmp/
*.tex; do pdflatex "$file"; done'.

But if I use the same command using os.system(), it will compile
correctly every file except the last one, for which it raises an error
(I get a prompt, as if I did a syntax error in tex document).

I suspected some kind of escaping issue, but it won't even work with
files such as : foo.txt, bar.txt.

Any idea ?
Thanks,
Cpa



More information about the Python-list mailing list