Differences
This shows you the differences between two versions of the page.
python [2006/06/09 00:00] a |
python [2009/05/25 00:35] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Python ====== | ||
- | |||
- | see: **[[http:// | ||
- | |||
- | ==== python interpreter (history + autocomplete) ==== | ||
- | |||
- | **'' | ||
- | try: | ||
- | import readline | ||
- | except ImportError: | ||
- | print " | ||
- | else: | ||
- | import rlcompleter | ||
- | readline.parse_and_bind(" | ||
- | import os | ||
- | histfile = os.path.join(os.environ[" | ||
- | try: | ||
- | readline.read_history_file(histfile) | ||
- | except IOError: | ||
- | pass | ||
- | import atexit | ||
- | atexit.register(readline.write_history_file, | ||
- | |||
- | |||
- | **'' | ||
- | export PYTHONSTARTUP=~/ | ||
- | |||
- | |||