mirror of
https://github.com/wassname/pyreadline.git
synced 2026-07-20 12:30:38 +08:00
bytes/str/unicode tweaking for py2/3.
This commit is contained in:
@@ -91,7 +91,7 @@ class LineHistory(object):
|
||||
fp = open(filename, u'wb')
|
||||
for line in self.history[-self.history_length:]:
|
||||
fp.write(ensure_str(line.get_line_text()))
|
||||
fp.write(u'\n')
|
||||
fp.write('\n'.encode('ascii'))
|
||||
fp.close()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user