On 2008-02-27, Michael Goerz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to raise an exception any time a subprocess tries to read
> from STDIN:
>
> latexprocess = subprocess.Popen( \
> 'pdflatex' + " " \
> + 'test' + " 2>&1", \
> shell=True, \
> cwd=os.getcwd(), \
> env=os.environ, \
> stdin=StdinCatcher() # any ideas here?
> )
>
> An exception should be raised whenever the pdflatex process
> reads from STDIN... and I have no idea how to do it. Any suggestions?
If I were you, I'd just run LaTeX in batch mode. That's what I
always used to do when automating the running of LaTeX using a
shell script or makefile. IIRC, you do something like this:
ret = os.system("latex \\batchmode\\input %s" % filename)
The return status will be zero for success and non-zero if
there were any errors.
--
Grant Edwards grante Yow! Remember, in 2039,
at MOUSSE & PASTA will
visi.com be available ONLY by
prescription!!
--
http://mail.python.org/mailman/listinfo/python-list