-rw-r--r-- pythonrc.py
1 import os 2 import sys 3 from pprint import pprint 4 5 try: 6 from ptpython.repl import embed as _embed 7 except ImportError: 8 print("ptpython is not available: falling back to standard prompt") 9 else: 10 sys.exit( 11 _embed( 12 globals(), 13 locals(), 14 vi_mode=True, 15 history_filename=os.environ.get( 16 "PYTHON_HISTORY", os.path.expanduser("~/.python_history") 17 ), 18 ) 19 ) 20