Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue22940

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:readline does not offer partial saves
Type:enhancementStage:resolved
Components:Library (Lib)Versions:Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: bru, python-dev
Priority:normalKeywords:patch

Created on2014-11-25 14:30 bybru, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
0001-Add-readline.append_history_file-function.patchbru,2014-11-25 14:30Patch adding readline.append_history_file(nelements, [filepath])review
Messages (3)
msg231661 -(view)Author: Bruno Cauet (bru)*Date: 2014-11-25 14:30
The "readline" module offers "write_history_file" from readline/history.h "write_history", but there's no "append_history_file" that would invoke "append_history" from the C header.This causes inconveniences when saving history to a file (like shown there:https://docs.python.org/3.5/library/readline.html?highlight=readline#example). Indeed, say you have 2 interpreters (A) and (B) open.- (A) and (B) load the history, composed of (z) lines- you work on both, writing (a) lines in (A) and (b) lines in (b)- you close (A), the history file now has (z)+(a)- you close (B), the history file now has (z)+(b)Therefore (A) history (the (a) lines) is lost. Offering "append_history_file" would be a nice way to fix this problem: having (z)+(a)+(b) in the end would be easy.This is exactly what the attached patch does. With it are tests, doc and an example. I've not updatedMisc/NEWS yet though (no issue #).
msg231726 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2014-11-26 19:58
New changesetff00588791be by Benjamin Peterson in branch 'default':add readline.append_history_file (closes#22940)https://hg.python.org/cpython/rev/ff00588791be
msg231730 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2014-11-26 21:03
New changesetc8bcede1b37a by Ned Deily in branch 'default':Issue 22940: fixes to editline supporthttps://hg.python.org/cpython/rev/c8bcede1b37a
History
DateUserActionArgs
2022-04-11 14:58:10adminsetgithub: 67129
2014-11-26 21:03:20python-devsetmessages: +msg231730
2014-11-26 19:58:42python-devsetstatus: open -> closed

nosy: +python-dev
messages: +msg231726

resolution: fixed
stage: resolved
2014-11-25 14:30:57brucreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp