Re: Raising exception on STDIN read

2008-02-29 Thread Ian Clark
On 2008-02-28, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > I hope it's more clear now. Python objects are only meaningful *inside* a > Python program, but an *external* program can't use them directly. Yes, sorry. This is what I was getting hung up on. My thinking was that subprocess was orch

Re: Raising exception on STDIN read

2008-02-28 Thread Gabriel Genellina
En Thu, 28 Feb 2008 15:22:21 -0200, Ian Clark <[EMAIL PROTECTED]> escribió: > On 2008-02-28, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> En Thu, 28 Feb 2008 14:29:04 -0200, Ian Clark <[EMAIL PROTECTED]> >> escribió: >> >>> On 2008-02-27, Gabriel Genellina <[EMAIL PROTECTED]> wrote: En

Re: Raising exception on STDIN read

2008-02-28 Thread Ian Clark
On 2008-02-28, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Thu, 28 Feb 2008 14:29:04 -0200, Ian Clark <[EMAIL PROTECTED]> > escribió: > >> On 2008-02-27, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >>> En Wed, 27 Feb 2008 15:06:36 -0200, Ian Clark <[EMAIL PROTECTED]> >>> escribi�: >>

Re: Raising exception on STDIN read

2008-02-28 Thread Gabriel Genellina
En Thu, 28 Feb 2008 14:29:04 -0200, Ian Clark <[EMAIL PROTECTED]> escribió: > On 2008-02-27, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> En Wed, 27 Feb 2008 15:06:36 -0200, Ian Clark <[EMAIL PROTECTED]> >> escribi�: >> >>> On 2008-02-27, Michael Goerz <[EMAIL PROTECTED]> wrote: Hi, >>

Re: Raising exception on STDIN read

2008-02-28 Thread Ian Clark
On 2008-02-27, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Wed, 27 Feb 2008 15:06:36 -0200, Ian Clark <[EMAIL PROTECTED]> > escribi�: > >> On 2008-02-27, Michael Goerz <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> I would like to raise an exception any time a subprocess tries to read >>> fro

Re: Raising exception on STDIN read

2008-02-27 Thread Gabriel Genellina
En Wed, 27 Feb 2008 18:59:59 -0200, Michael Goerz <[EMAIL PROTECTED]> escribi�: >> Try with stdin=open("/dev/full") or stdin=open("/dev/null") > using /dev/null works in my specific case (in my posted minimal example > I still have to press Enter, but in the real program it causes pdflatex > to

Re: Raising exception on STDIN read

2008-02-27 Thread Michael Goerz
Grant Edwards wrote, on 02/27/2008 04:34 PM: > 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' +

Re: Raising exception on STDIN read

2008-02-27 Thread Grant Edwards
On 2008-02-27, Grant Edwards <[EMAIL PROTECTED]> wrote: > ret1 = os.system('latex batchmodeinput %s' % 'label1.tex') At least for tetex under Linux, there's also a command line option to put TeX into batch mode: latex -interaction=batchmode file.tex I don't know if TeX on other platform

Re: Raising exception on STDIN read

2008-02-27 Thread Grant Edwards
On 2008-02-27, Grant Edwards <[EMAIL PROTECTED]> wrote: > 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' + " " \ >>

Re: Raising exception on STDIN read

2008-02-27 Thread Grant Edwards
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.g

Re: Raising exception on STDIN read

2008-02-27 Thread Michael Goerz
Gabriel Genellina wrote, on 02/27/2008 03:26 PM: > En Wed, 27 Feb 2008 15:06:36 -0200, Ian Clark <[EMAIL PROTECTED]> > escribi�: > >> 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: >>>

Re: Raising exception on STDIN read

2008-02-27 Thread Gabriel Genellina
En Wed, 27 Feb 2008 15:06:36 -0200, Ian Clark <[EMAIL PROTECTED]> escribi�: > 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'

Re: Raising exception on STDIN read

2008-02-27 Thread Michael Goerz
Ian Clark wrote, on 02/27/2008 12:06 PM: > On 2008-02-27, Michael Goerz <[EMAIL PROTECTED]> wrote: >> I would like to raise an exception any time a subprocess tries to read >> from STDIN: >> latexprocess = subprocess.Popen( \ >> 'pdflatex' + " " \ >> + 'test' + " 2>&1", \ >>

Re: Raising exception on STDIN read

2008-02-27 Thread Ian Clark
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.g

Raising exception on STDIN read

2008-02-27 Thread Michael Goerz
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