Results of 1 - 10 of about 44 for ParseTuple (0.007 sec.)
- 1. Extending Python with C or C++ — Python 3.14.8 ドキュメント 14261
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 1. Extending Python with C or C++ テーマ 自動 ライト ダーク | 1. Extending Python with C or C++ ¶ It is quite easy to add n
...lled): static PyObject * spam_system ( PyObject * self , PyObject * args ) { const char * command ; int sts ; if ( ! PyArg_ParseTuple ( args , "s" , & command )) return NULL ; sts = system ( command ); return PyLong_FromLong ( sts ); } There is a straightf...on objects --- in order to do anything with them in our C function we have to convert them to C values. The function PyArg_ParseTuple() in the Python API checks the argument types and converts them to C values. It uses a template string to determine the re...e arguments as well as the types of the C variables into which to store the converted values. More about this later. PyArg_ParseTuple() returns true (nonzero) if all arguments have the right type and its components have been stored in the variables whose a... - https://man.mtool.work/python/3.14/extending/extending.html
- 1. Extending Python with C or C++ — Python 3.14.8 ドキュメント 14016
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 1. Extending Python with C or C++ テーマ 自動 ライト ダーク | 1. Extending Python with C or C++ ¶ It is quite easy to add n
...lled): static PyObject * spam_system ( PyObject * self , PyObject * args ) { const char * command ; int sts ; if ( ! PyArg_ParseTuple ( args , "s" , & command )) return NULL ; sts = system ( command ); return PyLong_FromLong ( sts ); } There is a straightf...on objects --- in order to do anything with them in our C function we have to convert them to C values. The function PyArg_ParseTuple() in the Python API checks the argument types and converts them to C values. It uses a template string to determine the re...e arguments as well as the types of the C variables into which to store the converted values. More about this later. PyArg_ParseTuple() returns true (nonzero) if all arguments have the right type and its components have been stored in the variables whose a... - https://man.mtool.work/python/3.14/extending/extending.html
- 引数の解釈と値の構築 — Python 3.14.8 ドキュメント 9958
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » ユーティリティ » 引数の解釈と値の構築 テーマ 自動 ライト ダーク | 引数の解釈と値の構築 ¶ These functions are useful when creating
...ditional information and examples are available in Python インタプリタの拡張と埋め込み . 最初に説明する 3 つの関数、 PyArg_ParseTuple() , PyArg_ParseTupleAndKeywords() ,および PyArg_Parse() はいずれも 書式文字列 (format string) を使います。書式文字列は、関...キストの内容が入ったバッファへのポインタになります。テキストは最初の引数に指定したエンコード方式でエンコードされます。 PyArg_ParseTuple() を使うと、必要なサイズのバッファを確保し、そのバッファにエンコード後のデータをコピーして、 *buffer がこの新たに確保された...m_Free() で解放する責任があります。 *buffer が非 NULL のポインタ (すでにメモリ確保済みのバッファ) を指している場合、 PyArg_ParseTuple() はこのメモリ位置をバッファとして用い、 *buffer_length の初期値をバッファサイズとして用います。 PyArg_ParseTuple は次にエ... - https://man.mtool.work/python/3.14/c-api/arg.html
- 引数の解釈と値の構築 — Python 3.14.8 ドキュメント 9958
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » ユーティリティ » 引数の解釈と値の構築 テーマ 自動 ライト ダーク | 引数の解釈と値の構築 ¶ These functions are useful when creating
...ditional information and examples are available in Python インタプリタの拡張と埋め込み . 最初に説明する 3 つの関数、 PyArg_ParseTuple() , PyArg_ParseTupleAndKeywords() ,および PyArg_Parse() はいずれも 書式文字列 (format string) を使います。書式文字列は、関...キストの内容が入ったバッファへのポインタになります。テキストは最初の引数に指定したエンコード方式でエンコードされます。 PyArg_ParseTuple() を使うと、必要なサイズのバッファを確保し、そのバッファにエンコード後のデータをコピーして、 *buffer がこの新たに確保された...m_Free() で解放する責任があります。 *buffer が非 NULL のポインタ (すでにメモリ確保済みのバッファ) を指している場合、 PyArg_ParseTuple() はこのメモリ位置をバッファとして用い、 *buffer_length の初期値をバッファサイズとして用います。 PyArg_ParseTuple は次にエ... - https://man.mtool.work/python/3.14/c-api/arg.html
- 5. Windows 上での C および C++ 拡張モジュールのビルド — Python 3.14.8 ドキュメ... 7945
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 5. Windows 上での C および C++ 拡張モジュールのビルド テーマ 自動 ライト ダーク | 5. Windows 上での C および C++ 拡張モジュ
...mand created three files: spam.obj , spam.dll and spam.lib . Spam.dll does not contain any Python functions (such as PyArg_ParseTuple() ), but it does know how to find the Python code thanks to the implicitly linked pythonXY.lib . 二つ目のコマンドでは、 ni.../ pythonXY . lib 最初のコマンドで、三つのファイル: spam.obj 、 spam.dll および spam.lib ができます。 Spam.dll には ( PyArg_ParseTuple() のような) Python 関数は全く入っていませんが、 pythonXY.lib のおかげで Python コードを見つけることはできます。 二つ目のコ... - https://man.mtool.work/python/3.14/extending/windows.html
- 5. Windows 上での C および C++ 拡張モジュールのビルド — Python 3.14.8 ドキュメ... 7945
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 5. Windows 上での C および C++ 拡張モジュールのビルド テーマ 自動 ライト ダーク | 5. Windows 上での C および C++ 拡張モジュ
...mand created three files: spam.obj , spam.dll and spam.lib . Spam.dll does not contain any Python functions (such as PyArg_ParseTuple() ), but it does know how to find the Python code thanks to the implicitly linked pythonXY.lib . 二つ目のコマンドでは、 ni.../ pythonXY . lib 最初のコマンドで、三つのファイル: spam.obj 、 spam.dll および spam.lib ができます。 Spam.dll には ( PyArg_ParseTuple() のような) Python 関数は全く入っていませんが、 pythonXY.lib のおかげで Python コードを見つけることはできます。 二つ目のコ... - https://man.mtool.work/python/3.14/extending/windows.html
- 共通のオブジェクト構造体 (common object structure) — Python 3.14.8 ドキュメント 7684
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » 共通のオブジェクト構造体 (common object structure) テーマ 自動 ライト
...ジェクトです。第二のパラメタ (よく args と呼ばれます) は、全ての引数を表現するタプルオブジェクトです。パラメタは通常、 PyArg_ParseTuple() や PyArg_UnpackTuple() で処理されます。 METH_KEYWORDS ¶ Can only be used in certain combinations with other flags: METH_...e keyword arguments or possibly NULL if there are no keyword arguments. The parameters are typically processed using PyArg_ParseTupleAndKeywords() . METH_FASTCALL ¶ 次に属します: Stable ABI (バージョン 3.10 より). Fast calling convention supporting only po...に属します: Stable ABI . Methods with a single object argument can be listed with the METH_O flag, instead of invoking PyArg_ParseTuple() with a "O" argument. They have the type PyCFunction , with the self parameter, and a PyObject * parameter representing t... - https://man.mtool.work/python/3.14/c-api/structures.html
- 共通のオブジェクト構造体 (common object structure) — Python 3.14.8 ドキュメント 7684
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » 共通のオブジェクト構造体 (common object structure) テーマ 自動 ライト
...ジェクトです。第二のパラメタ (よく args と呼ばれます) は、全ての引数を表現するタプルオブジェクトです。パラメタは通常、 PyArg_ParseTuple() や PyArg_UnpackTuple() で処理されます。 METH_KEYWORDS ¶ Can only be used in certain combinations with other flags: METH_...e keyword arguments or possibly NULL if there are no keyword arguments. The parameters are typically processed using PyArg_ParseTupleAndKeywords() . METH_FASTCALL ¶ 次に属します: Stable ABI (バージョン 3.10 より). Fast calling convention supporting only po...に属します: Stable ABI . Methods with a single object argument can be listed with the METH_O flag, instead of invoking PyArg_ParseTuple() with a "O" argument. They have the type PyCFunction , with the self parameter, and a PyObject * parameter representing t... - https://man.mtool.work/python/3.14/c-api/structures.html
- 3. 拡張の型の定義: 雑多なトピック — Python 3.14.8 ドキュメント 7561
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 3. 拡張の型の定義: 雑多なトピック テーマ 自動 ライト ダーク | 3. 拡張の型の定義: 雑多なトピック ¶ この節ではさまざまな実装可
...hello') の場合、 self は obj1 になります。 args は呼び出しの引数を格納しているタプルです。ここから引数を取り出すには PyArg_ParseTuple() を使います。 kwds is a dictionary of keyword arguments that were passed. If this is non- NULL and you support keyword ar...guments, use PyArg_ParseTupleAndKeywords() to extract the arguments. If you do not want to support keyword arguments and this is non- NULL , raise a Typ...( newdatatypeobject * ) op ; PyObject * result ; const char * arg1 ; const char * arg2 ; const char * arg3 ; if ( ! PyArg_ParseTuple ( args , "sss:call" , & arg1 , & arg2 , & arg3 )) { return NULL ; } result = PyUnicode_FromFormat ( "Returning -- value: [... - https://man.mtool.work/python/3.14/extending/newtypes.html
- 3. 拡張の型の定義: 雑多なトピック — Python 3.14.8 ドキュメント 7561
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 3. 拡張の型の定義: 雑多なトピック テーマ 自動 ライト ダーク | 3. 拡張の型の定義: 雑多なトピック ¶ この節ではさまざまな実装可
...hello') の場合、 self は obj1 になります。 args は呼び出しの引数を格納しているタプルです。ここから引数を取り出すには PyArg_ParseTuple() を使います。 kwds is a dictionary of keyword arguments that were passed. If this is non- NULL and you support keyword ar...guments, use PyArg_ParseTupleAndKeywords() to extract the arguments. If you do not want to support keyword arguments and this is non- NULL , raise a Typ...( newdatatypeobject * ) op ; PyObject * result ; const char * arg1 ; const char * arg2 ; const char * arg3 ; if ( ! PyArg_ParseTuple ( args , "sss:call" , & arg1 , & arg2 , & arg3 )) { return NULL ; } result = PyUnicode_FromFormat ( "Returning -- value: [... - https://man.mtool.work/python/3.14/extending/newtypes.html