per page, with , order by , clip by
Results of 1 - 1 of about 1 for histfile (0.001 sec.)
readline --- GNU readline のインターフェース 9414
readline --- GNU readline のインターフェース readline モジュールには、Python インタープリタでの補完や履歴ファイルの読み書きを容易にする関数が定義されています。 このモジュールは直接使うことも、対話プロンプトで Python 識別子の補完を提供する r ... ドはユーザーの PYTHONSTARTUP ファイルに置き、対話セッション中に自動的に実行します。 import atexit import os import readline histfile = os . path . join ( os . path . expanduser ( "~" ), ".python_history" ) try : readline . read_history_file ( histfile ) # ... readline . set_history_length ( 1000 ) except FileNotFoundError : pass atexit . register ( readline . write_history_file , histfile ) Python が 対話モード で実行される時、このコードは実際には自動的に実行されます ( readline の設定 を参照してください)。 次 ... 、ここでは新規の履歴のみを追加することで、並行して対話セッションがサポートされます: import atexit import os import readline histfile = os . path . join ( os . path . expanduser ( "~" ), ".python_history" ) try : readline . read_history_file ( histfile ) h ...
https://man.mtool.work/python/3.14/library/readline.html
PREV 1 NEXT