common/migration.py
branch3.5
changeset 3201 8af05e82510c
parent 2897 2658f432284c
child 3230 1d25e928c299
equal deleted inserted replaced
3192:93c8fdcd943e 3201:8af05e82510c
   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