Results of 1 - 10 of about 18 for save (0.007 sec.)
- What's New in Python 2.2 12628
- What's New in Python 2.2 著者 : A.M. Kuchling はじめに この文書は 2002 年 10 月 14 日にリリースされた Python 2.2.2 の新機能について解説します。Python 2.2.2 は 2001 年 12 月 21 日にリリースされた Python 2.2 のバグフィックスリリースです。 Pyt
...います。クラスのこのようなセットを考えてみましょう (ダイアグラムは Guido van Rossum による PEP 253 より): class A : ^ ^ def save ( self ): ... / \ / \ / \ / \ class B class C : ^ ^ def save ( self ): ... \ / \ / \ / \ / class D 旧スタイルクラスの検索規...則は単純ですが、あまり賢くありません。 基底クラスを左から右へ深さ優先で検索します。 D.save() を参照すると、 D 、 B 、 A の順にクラスを検索し、そこで見つかった save() を返します。 C.save() は決して見つかりません。...これは問題です。 C の save() メソッドが C 固有の内部状態を保存している場合、それを呼び出さないとその状態がまったく保存されないからです。 新スタイルク... - https://man.mtool.work/python/3.14/whatsnew/2.2.html
- スレッド状態とグローバルインタープリタロック 12336
- スレッド状態とグローバルインタープリタロック CPython の フリースレッドビルド を除き、Python インタープリタは一般にスレッドセーフではありません。 マルチスレッドの Python プログラムをサポートするため、 グローバルインタープリタロック 、または
...ーカル変数を宣言します; Py_END_ALLOW_THREADS はブロックを閉じます。 上のブロックは次のコードに展開されます: PyThreadState * _save ; _save = PyEval_SaveThread (); ... ブロッキング I / O 操作を行う ... PyEval_RestoreThread ( _save ); これらの関数は次のよ...レッド状態がアタッチされているということは、そのインタープリタの GIL を保持しているということです。 デタッチするには PyEval_SaveThread() を呼び出し、結果をローカル変数に保存します。 スレッド状態をデタッチすると GIL が解放され、現在のスレッドがブロッキ...y_BEGIN_ALLOW_THREADS This macro is available when compiling for the Stable ABI . このマクロを展開すると { PyThreadState *_save; _save = PyEval_SaveThread(); になります。マクロに開き波括弧が入っていることに注意してください; この波括弧は後で Py_END_AL... - https://man.mtool.work/python/3.14/c-api/threads.html
- readline --- GNU readline のインターフェース 10895
- readline --- GNU readline のインターフェース readline モジュールには、Python インタープリタでの補完や履歴ファイルの読み書きを容易にする関数が定義されています。 このモジュールは直接使うことも、対話プロンプトで Python 識別子の補完を提供する r
...en = readline . get_current_history_length () except FileNotFoundError : open ( histfile , 'wb' ) . close () h_len = 0 def save ( prev_h_len , histfile ): new_h_len = readline . get_current_history_length () readline . set_history_length ( 1000 ) rea...dline . append_history_file ( new_h_len - prev_h_len , histfile ) atexit . register ( save , h_len , histfile ) 次の例では code.InteractiveConsole クラスを拡張し、履歴の保存・復旧をサポートします。 import atexit i...istory_file" ): try : readline . read_history_file ( histfile ) except FileNotFoundError : pass atexit . register ( self . save_history , histfile ) def save_history ( self , histfile ): readline . set_history_length ( 1000 ) readline . write_history... - https://man.mtool.work/python/3.14/library/readline.html
- IDLE --- Python のエディタとシェル 10020
- IDLE --- Python のエディタとシェル ソースコード: Lib/idlelib/ IDLE は Python の統合開発環境で、学習用環境です。 IDLE は次のような特徴があります: クロスプラットホーム: Windows, Unix, macOS で動作します コード入力、出力、エラーメッセージの色付
...グが開きます。 Path Browser [パスブラウザ] sys.path のディレクトリ、モジュール、関数、クラス、メソッドを木構造で表示します。 Save [保存] 現在のウィンドウを対応するファイルがあればそこに保存します。開いてから、または最後に保存したのちに編集があった場合の...ウィンドウには、ウィンドウタイトルの前後に * が付けられます。対応するファイルがなければ代わりに Save As が実行されます。 Save As... [名前を付けて保存...] Save As ダイアログを使って現在のウィンドウを保存します。 保存したファ...イルには '.py'、テキストファイルには '.txt' を追加します。 ただし macOS Aqua では、すべてのファイルに '.py' を追加します。) Save Copy As... [コピーとして保存...] ウィンドウに対応するファイルを変更せずに、現在のウィンドウを別のファイルに保存します。 (拡... - https://man.mtool.work/python/3.14/library/idle.html
- http.cookiejar --- HTTP クライアント用の Cookie 処理 8870
- http.cookiejar --- HTTP クライアント用の Cookie 処理 ソースコード: Lib/http/cookiejar.py http.cookiejar モジュールは、HTTP クッキーを自動で扱うクラスを定義しています。 ウェブサーバーからの HTTP レスポンスで小さなデータ ( クッキー ) をクライ
...属性が明示的に指定されていたものです)。 対話型ブラウザーでは、通常はブラウザーのウィンドウを閉じるとセッションが終了します。 save() メソッドは、 ignore_discard 引数に真を渡して指示しない限り、いずれにせよセッションクッキーを保存しません。 さらに FileCo...okieJar は以下のようなメソッドを実装しています: FileCookieJar. save ( filename = None , ignore_discard = False , ignore_expires = False ) クッキーをファイルに保存します。 この基底クラスは No...lse ) ファイルからクッキーを読み込みます。 それまでのクッキーは新しいものに上書きされない限り残ります。 ここでの引数の値は save() と同じです。 指定されたファイルは、このクラスが理解できる形式でなければなりません。 そうでなければ LoadError が送出されま... - https://man.mtool.work/python/3.14/library/http.cookiejar.html
- GDB による C API 拡張と CPython 内部のデバッグ 8579
- GDB による C API 拡張と CPython 内部のデバッグ このドキュメントでは、Python の GDB 拡張 python-gdb.py を GDB デバッガと組み合わせて、CPython 拡張や CPython インタープリタ自体をデバッグする方法を説明します。 クラッシュやデッドロックなどの低レ
...ac, for file /usr/lib/python2.6/site-packages/gnome_sudoku/game_selector.py, line 201, in run_swallowed_dialog (self=<NewOrSavedGameSelector(new_game_model=<gtk.ListStore at remote 0x98fab44>, puzzle=None, saved_games=[{'gsd.auto_fills': 0, 'tracking...': {}, 'trackers': {}, 'notes': [], 'saved_at': 1270084485, 'game': '7 8 0 0 0 0 0 5 6 0 0 9 0 8 0 1 0 0 0 4 6 0 0 0 0 7 0 6 5 0 0 0 4 7 9 2 0 0 0 9 0 1 0 0 0 3 9 7...: <float at remote 0x984b494>, 'timer.total_time': <float at remote 0x984b464>}], dialog=<gtk.Dialog at remote 0x98faaa4>, saved_game_model=<gtk.ListStore at remote 0x98fad24>, sudoku_maker=<SudokuMaker(terminated=False, played=[], batch_siz...(trunc... - https://man.mtool.work/python/3.14/howto/gdb_helpers.html
- The Python Profilers 8579
- The Python Profilers Source code: Lib/profile.py and Lib/pstats.py Introduction to the profilers cProfile and profile provide deterministic profiling of Python programs. A profile is a set of statistics that describes how often and for how
...n any Python one. Instant User's Manual This section is provided for users that "don't want to read the manual." It provides a very brief overview, and allows a user to rapidly perform profiling on an existing application. To profile a function that...are the same, and only the single figure is printed. Instead of printing the output at the end of the profile run, you can save the results to a file by specifying a filename to the run() function: import cProfile import re cProfile . run ( 're.compi...the -m option to profile . The pstats module's Stats class has a variety of methods for manipulating and printing the data saved into a profile results file: import pstats from pstats import SortKey p = pstats . Stats ( 'restats' ) p . strip_dirs ()... - https://man.mtool.work/python/3.14/library/profile.html
- turtle --- タートルグラフィックス 8304
- turtle --- タートルグラフィックス ソースコード: Lib/turtle.py Turtle star 単純な動きを繰り返すプログラムで、タートルは複雑な図形を描けます。 x-y 平面の (0, 0) から動き出す、亀のロボットを想像してください。 import turtle の後に turtle.forwar
...fg の中で True とされているべきです。この場合、IDLE のメインループもクライアントスクリプトから見てアクティブです。 turtle. save ( filename , overwrite = False ) 現在のタートルの描画内容 (タートル自身も含む) を PostScript ファイルとして保存します。 パ...た名前のファイルがすでに存在する場合は、 FileExistsError を送出します。 True の場合は、ファイルを上書きします。 >>> screen . save ( "my_drawing.ps" ) >>> screen . save ( "my_drawing.ps" , overwrite = True ) Added in version 3.14. turtle. setup ( width... - https://man.mtool.work/python/3.14/library/turtle.html
- curses --- 文字セル表示のターミナル処理 8012
- curses --- 文字セル表示のターミナル処理 ソースコード: Lib/curses curses モジュールは、移植可能な高度な端末処理の事実上の標準である curses ライブラリへのインターフェースを提供します。 curses が最も広く用いられているのは Unix 環境ですが、Wind
...shell" モードに復旧し、あらかじめ def_shell_mode() で保存した内容に戻します。 curses. resetty ( ) 端末モードの状態を最後に savetty() を呼び出した時の状態に戻します。 curses. resize_term ( nlines , ncols ) resizeterm() で使用されるバックエンド関数で、...、curses ライブラリが使用する、その他のウィンドウサイズを記憶しているデータ (特に SIGWINCH ハンドラ) を調整します。 curses. savetty ( ) resetty() で使用される、バッファ内の端末モードの現在の状態を保存します。 curses. get_escdelay ( ) set_escdelay() で...resh) curses. KEY_REPLACE 置換 (Replace) curses. KEY_RESTART 再起動 (Restart) curses. KEY_RESUME 再開 (Resume) curses. KEY_SAVE Save [保存] curses. KEY_SBEG シフト付き Beg curses. KEY_SCANCEL シフト付き Cancel curses. KEY_SCOMMAND シフト付き Command... - https://man.mtool.work/python/3.14/library/curses.html
- cmd --- 行指向のコマンドインタープリターのサポート 7721
- cmd --- 行指向のコマンドインタープリターのサポート ソースコード: Lib/cmd.py Cmd クラスでは、行指向のコマンドインタープリタを書くための簡単なフレームワークを提供します。テストハーネスや管理ツール、そして、後により洗練されたインターフェイスで
...ou for using Turtle' ) self . close () bye () return True # ----- record and playback ----- def do_record ( self , arg ): 'Save future commands to filename: RECORD rose.cmd' self . file = open ( arg , 'w' ) def do_playback ( self , arg ): 'Playback c... - https://man.mtool.work/python/3.14/library/cmd.html