Hello, I'm a newbie with Python and there are some things I don't
understand of os.system.
I've managed to write a script that works in order to test some
things:
import os
os.system('C:\\ texmf\\miktex\\ bin\\latex.exe "C:\Documen ts and
Settings\User\E scritorio\sampl e2e.tex" -output-directory "C:\Documen ts
and Settings\User\E scritorio"')
os.startfile('C :\Documents and Settings\User\E scritorio\sampl e2e.dvi')
This script launches the program "latex" and passes the input and
output file names and directories. Afterwards it launches a dvi viewer
to view the output.
I have 2 questions:
Why do I have to use double \\ in C:\\texmf\\mikt ex\\bin\\latex. exe
(if not it does not work)? And why not in the other places?
If I have the string "C:\Documen ts and
Settings\User\E scritorio\sampl e2e.tex" stored in a variable, how could
I use it?
Thanks in advance, miz.
understand of os.system.
I've managed to write a script that works in order to test some
things:
import os
os.system('C:\\ texmf\\miktex\\ bin\\latex.exe "C:\Documen ts and
Settings\User\E scritorio\sampl e2e.tex" -output-directory "C:\Documen ts
and Settings\User\E scritorio"')
os.startfile('C :\Documents and Settings\User\E scritorio\sampl e2e.dvi')
This script launches the program "latex" and passes the input and
output file names and directories. Afterwards it launches a dvi viewer
to view the output.
I have 2 questions:
Why do I have to use double \\ in C:\\texmf\\mikt ex\\bin\\latex. exe
(if not it does not work)? And why not in the other places?
If I have the string "C:\Documen ts and
Settings\User\E scritorio\sampl e2e.tex" stored in a variable, how could
I use it?
Thanks in advance, miz.
Comment