Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. """
  2. Custom evironment setup for the python interpreter
  3.  
  4. Usage:
  5. 1. Save to ~/.pythonrc.py (doesn't have to be there, just conventional)
  6. 2. Point the PYTHONSTARTUP environment variable to your file; e.g. for bash, add
  7. the following to your ~/.bashrc or ~/.profile:
  8. export PYTHONSTARTUP=~/.pythonrc
  9. """
  10.  
  11. ### enable tab completion
  12. import rlcompleter, readline
  13. readline.parse_and_bind("tab: complete")
  14.  
  15. ### import custom python utilities
  16. import sys
  17. from os.path import expanduser
  18. # I keep my custom_utils.py in my home directory, but put it where you want and update the path here
  19. sys.path.append(expanduser('~'))
  20. from custom_utils import *
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement