In article <[email protected]>, Lawrence D'Oliveiro <[email protected]_zealand> wrote:
> In message <[email protected]>, Ned Deily > wrote: > > try: > > import readline > > except ImportError: > > print("Module readline not available.") > > else: > > import rlcompleter > > readline.parse_and_bind("tab: complete") > > > > Note the print() form which works with either Python 2 or 3. > You should be writing diagnostics to stderr, not stdout. In general, sure. Statements in a PYTHONSTARTUP file, like here, are only executed in interactive mode and it isn't likely that someone is going to be redirecting stdout or stderr; that would kind of defeat the purpose of readline completion functions which is what this is all about. But, if you feel strongly about it, I'm sure a contributed patch to improve the rlcompleter documentation would be welcome. -- Ned Deily, [email protected] -- http://mail.python.org/mailman/listinfo/python-list
