common/migration.py
changeset 3230 1d25e928c299
parent 3152 7ef7c82daf59
parent 3201 8af05e82510c
child 3700 fd550e4dc515
equal deleted inserted replaced
3199:fc63b80ec979 3230:1d25e928c299
   226             # readline not available
   226             # readline not available
   227             pass
   227             pass
   228         else:
   228         else:
   229             readline.set_completer(Completer(local_ctx).complete)
   229             readline.set_completer(Completer(local_ctx).complete)
   230             readline.parse_and_bind('tab: complete')
   230             readline.parse_and_bind('tab: complete')
   231             histfile = os.path.join(os.environ["HOME"], ".eshellhist")
   231             home_key = 'HOME'
       
   232             if sys.platform == 'win32':
       
   233                 home_key = 'USERPROFILE'
       
   234             histfile = os.path.join(os.environ[home_key], ".eshellhist")
   232             try:
   235             try:
   233                 readline.read_history_file(histfile)
   236                 readline.read_history_file(histfile)
   234             except IOError:
   237             except IOError:
   235                 pass
   238                 pass
   236         from code import interact
   239         from code import interact