ralf at brainbot.com
Wed Jan 13 21:52:34 CET 2010
Lennart Regebro <regebro at gmail.com> writes:
> On Wed, Jan 13, 2010 at 18:40, Ralf Schmitt <ralf at brainbot.com> wrote:
>> The first thing I got while trying to run a python3 prompt few days ago,
>> was an error. python3 tried to read my $PYTHONSTARTUP file, which used
>> print statements. people will have to run both python 2 and python 3
>> code at the same time. Using different environment variables will make
>> this easier.
> What do you need to do in the PYTHONSTARTUP file?
> Ten years of Python programming, and I didn't even know it existed. :-)
hehe. tab completion:
# -*- mode: python -*-
# Last changed: 2009-12-23 22:25:15 by ralf
sys.stdout.write("Module readline not available.\n")
# Use tab for completions
# This forces readline to automatically print the above list when tab
# completion is set to 'complete'.
readline.parse_and_bind('set show-all-if-ambiguous on')
# Bindings for incremental searches in the history. These searches
# use the string typed so far on the command line and search
# anything in the previous input history containing them.
history = os.path.expanduser("~/.pyhistory")
More information about the Python-Dev