[OS X 10.5] hitting TAB inserts ./ in interactive mode ?
Ned Deily
nad at acm.org
Sat Sep 18 14:28:57 EDT 2010
In article <i71rq5$4t9$4 at lust.ihug.co.nz>,
Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> wrote:
> In message <mailman.850.1284782522.29448.python-list at python.org>, 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,
nad at acm.org
More information about the Python-list
mailing list