mirror of
https://github.com/wassname/pyreadline.git
synced 2026-06-27 16:10:38 +08:00
@@ -98,6 +98,7 @@ class LineHistory(object):
|
||||
|
||||
def add_history(self, line):
|
||||
'''Append a line to the history buffer, as if it was the last line typed.'''
|
||||
line = ensure_unicode(line)
|
||||
if not hasattr(line, "get_line_text"):
|
||||
line = lineobj.ReadLineTextBuffer(line)
|
||||
if not line.get_line_text():
|
||||
|
||||
@@ -10,7 +10,7 @@ from __future__ import print_function, unicode_literals, absolute_import
|
||||
import logging
|
||||
import logging.handlers
|
||||
import struct, socket
|
||||
from .unicode_helper import ensure_unicode
|
||||
from pyreadline.unicode_helper import ensure_unicode
|
||||
try:
|
||||
import msvcrt
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user