Results of 1 - 2 of about 2 for InteractiveConsole (0.001 sec.)
- code --- インタープリター基底クラス 11228
- code --- インタープリター基底クラス ソースコード: Lib/code.py code モジュールはread-eval-print (読み込み-評価-表示)ループをPythonで実装するための機能を提供します。対話的なインタプリタプロンプトを提供するアプリケーションを作るために使える二つ
...した名前空間に属します。 これらを pickle 化できるのは、 locals が既存のモジュールの名前空間である場合だけです。 class code. InteractiveConsole ( locals = None , filename = '<console>' , local_exit = False ) Python の対話型インタープリターの振る舞いを忠実にエミュレー...unc = None , local = None , exitmsg = None , local_exit = False ) read-eval-print ループを実行するための便利な関数。これは InteractiveConsole の新しいインスタンスを作り、 readfunc が与えられた場合は InteractiveConsole.raw_input() メソッドとして使われるように設定し...ます。 local が与えられた場合は、インタープリターループのデフォルト名前空間として使うために InteractiveConsole コンストラクタへ渡されます。 local_exit が与えられた場合は、 InteractiveConsole コンストラクタへ渡されます。そして、インス... - https://man.mtool.work/python/3.14/library/code.html
- readline --- GNU readline のインターフェース 7485
- readline --- GNU readline のインターフェース readline モジュールには、Python インタープリタでの補完や履歴ファイルの読み書きを容易にする関数が定義されています。 このモジュールは直接使うことも、対話プロンプトで Python 識別子の補完を提供する r
.... append_history_file ( new_h_len - prev_h_len , histfile ) atexit . register ( save , h_len , histfile ) 次の例では code.InteractiveConsole クラスを拡張し、履歴の保存・復旧をサポートします。 import atexit import code import os import readline class HistoryConsol...e ( code . InteractiveConsole ): def __init__ ( self , locals = None , filename = "<console>" , histfile = os . path . expanduser ( "~/.console-history"...)): code . InteractiveConsole . __init__ ( self , locals , filename ) self . init_history ( histfile ) def init_history ( self , histfile ): readline .... - https://man.mtool.work/python/3.14/library/readline.html
PREV
1
NEXT