Raising exception on STDIN read

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Feb 27 23:13:39 CET 2008


En Wed, 27 Feb 2008 18:59:59 -0200, Michael Goerz  
<newsgroup898sfie at 8439.e4ward.com> 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 fail, like I want it to). However, the solution is limited do Linux,
> as on Windows there's no /dev/null. Is there a platform independent
> solution?

It's spelled "NUL" on Windows; os.devnull returns the right thing  
depending on the platform.

-- 
Gabriel Genellina




More information about the Python-list mailing list