(no title)
marcher | 17 years ago
You might find my pythonrc useful: [link redacted] - be sure to run export PYTHONSTARTUP=~/.pythonrc.py.
My script does the following:
1. Enables readline tab completion. 2. Makes tab insert four spaces. 3. Persists command history (~/.pyhistory). You can disable it by running NOHIST= python. 4. Changes the print hook on functions to include their signature, as well as their documentation. 5. Changes the print hook to use pprint for everything else, also taking into account the terminal width. 6. Colorizes exceptions if Pygments is available. 7. Adds a source() function that shows you the source code of a function, class, or module in your pager. Code is syntax highlighted if Pygments is available. This function works on zipped eggs as well.
Also, enabling readline means all your ~/.inputrc bindings will work. So for example you can hit ^R to search back in history for a snippet you wrote.
breck|17 years ago