No tab completion if sys.stdout is redirected
Bjoern Schliessmann
usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Tue Dec 18 09:13:14 EST 2007
Dirk Loss wrote:
> I want to have tab completion in my program for interactive input.
> Using readline and rlcompleter this works nicely. But I also have
> to catch and modify all "print" output, so I redirect sys.stdout
> to a custom file-like object. The problem is: After the
> redirection, readline support seems suddenly disabled. Why?
readline module applies its autocompletion functions to (and only
to) sys.stdout.
Regards,
Björn
--
BOFH excuse #350:
paradigm shift...without a clutch
More information about the Python-list
mailing list