From: Arfrever F. T. A. <arf...@gm...> - 2011-07-06 21:15:51
|
2011-07-06 21:10:32 Guenter Milde napisał(a): > On 2011-07-06, Arfrever Frehtes Taifersar Arahesis wrote: > > > [-- Type: text/plain, Encoding: quoted-printable --] > > > 2011-07-06 09:12:36 Guenter Milde napisał(a): > >> On 2011-07-05, Arfrever Frehtes Taifersar Arahesis wrote: > > >> > [-- Type: text/plain, Encoding: quoted-printable --] > > >> > This ignored exception occurs only with Python 3 (even without '> > >> > /dev/null'). I use Docutils trunk r7071. > > >> > $ touch test.rst $ rst2html.py-2.7 test.rst > /dev/null $ > >> > rst2html.py-3.2 test.rst > /dev/null Exception ValueError: 'I/O > >> > operation on closed file.' in <_io.TextIOWrapper name='<stdout>' > >> > mode='w' encoding='UTF-8'> ignored > > >> Can you > ... > >> report the traceback, please. > > > Unfortunately this command doesn't print any traceback. The output is > > the same as without --traceback option. The traceback is also not shown > > when stdout is not redirected to /dev/null. > > Hm, hard to track down without. Seems like something is closing the stdout > stream. Apparently docutils.io.FileOutput.close() closes sys.stdout: def close(self): self.destination.close() self.opened = False self.destination == sys.stdout > When did you first realize this problem? Yesterday. Previously rst2html.py with Python 3 was failing with AttributeError in docutils.core.Publisher.process_command_line(). > Does it work with Python 3.1? The output with Python 3.1 is identical as with Python 3.2. > Do you see the expected output on stdout when it is not redirected? Yes. -- Arfrever Frehtes Taifersar Arahesis |