Issue940286
Created on 2004-04-22 20:11 by tws5, last changed 2009-04-22 17:16 by ajaksu2.
|
msg60481 - (view) |
Author: Maxim Krikun (tws5) |
Date: 2004-04-22 20:11 |
|
The ourput of pydoc.Helper help() method is always sent
to sys.stdout, even if Helper was supplied with
different input/output streams at initialization. Other
methods: listtopics etc. work as expected.
Example:
########################
import sys, pydoc
from StringIO import StringIO
buf=StringIO()
H=pydoc.Helper(sys.stdin,buf)
H.listtopics()
H.help("pydoc")
#at this point help on pydoc is printed to stdout
H.listtopics()
ss=buf.getvalue()
print ss
#at this point the list of topics is printed twice
########################
sys.version:
'2.3 (#46, Aug 11 2003, 09:34:05) [MSC v.1200 32 bit
(Intel)]'
The problem persists in pydoc.py version 1.90 from CVS.
The reason for such behaviour is a call to global (in
module scope) function doc() at line 1628 in pydoc.py 1.90.
which doesn't care about Helper.input Helper.output
settings.
|
|
msg82047 - (view) |
Author: Daniel Diniz (ajaksu2) |
Date: 2009-02-14 13:53 |
|
Confirmed. Is it relevant?
|
|
| Date |
User |
Action |
Args |
| 2009-04-22 17:16:39 | ajaksu2 | set | keywords:
+ easy stage: test needed |
| 2009-02-14 13:53:53 | ajaksu2 | set | type: behavior messages:
+ msg82047 nosy:
+ ajaksu2 versions:
+ Python 2.6, - Python 2.3 |
| 2004-04-22 20:11:10 | tws5 | create | |
|