per page, with , order by , clip by
Results of 1 - 7 of about 7 for modulename (0.004 sec.)
拡張モジュールの定義 13413
拡張モジュールの定義 A C extension for CPython is a shared library (for example, a .so file on Linux, .pyd DLL on Windows), which is loadable into the Python process (for example, it is compiled with compatible compiler settings), and which ... ization function The initialization function defined by an extension module has the following signature: PyObject * PyInit_modulename ( void ) Its name should be PyInit_ <name> , with <name> replaced by the name of the module. For modules with ASCII-only n ... must instead be named PyInit_ <name> , with <name> replaced by the name of the module. When using 多段階初期化 , non-ASCII module names are allowed. In this case, the initialization function name is PyInitU_ <name> , with <name> encoded using Python's puny ... ly the only non- static item defined in the module's C source. 多段階初期化 Normally, the initialization function ( PyInit_modulename ) returns a PyModuleDef instance with non- NULL m_slots . Before it is returned, the PyModuleDef instance must be initiali ...
https://man.mtool.work/python/3.14/c-api/extension-modules.html
拡張と埋め込み FAQ 9015
拡張と埋め込み FAQ C で独自の関数を作ることはできますか? はい。関数、変数、例外、そして新しいタイプまで含んだビルトインモジュールを C で作れます。これはドキュメント Python インタプリタの拡張と埋め込み で説明されています。 ほとんどの中級から ... アクセスするにはどうしますか? 以下のようにモジュールオブジェクトへのポインタを得られます: module = PyImport_ImportModule ( "<modulename>" ); そのモジュールがまだインポートされていない (つまり、まだ sys.modules に現れていない) なら、これはモジュールを初期化し ... ます。そうでなければ、単純に sys.modules["<modulename>"] の値を返します。なお、これはモジュールをいかなる名前空間にも代入しません。これはモジュールが初期化されて ' sys.modules ...
https://man.mtool.work/python/3.14/faq/extending.html
DTrace と SystemTap で CPython を測定する 8851
DTrace と SystemTap で CPython を測定する author : David Malcolm author : Łukasz Langa Dtrace と SystemTap はモニタリングツールで、コンピュータシステムのプロセスが何をしているかを調べる方法を提供します。 どちらもドメイン固有言語 (domain-spe ... ベージコレクションのサイクルを終了したときに発火します。 arg0 は回収したオブジェクトの数です。 import__find__load__start(str modulename) importlib がモジュールの検索と読み込みを試みる前に発火します。 arg0 はモジュール名です。 Added in version 3.7. import__fi ... nd__load__done(str modulename, int found) importlib の find_and_load 関数が呼び出された後に発火します。 arg0 はモジュール名で、 arg1 はモジュールの読み込 ...
https://man.mtool.work/python/3.14/howto/instrumentation.html
カプセル 8524
カプセル これらのオブジェクトの使い方については 拡張モジュールに C API を提供する を参照してください。 Added in version 3.1. type PyCapsule PyObject のこのサブタイプは不透明な値を表します。 C 拡張モジュールから Python のコードを経由して別の ... セルが削除されるときにそのカプセルを引数として呼び出されます。 このカプセルがモジュールの属性として保存される場合、 name は modulename.attributename と指定されるべきです。こうすると、他のモジュールがそのカプセルを PyCapsule_Import() でインポートすることがで ...
https://man.mtool.work/python/3.14/c-api/capsule.html
6. モジュール 8033
6. モジュール Python インタプリタを終了させ、再び起動すると、これまでに行ってきた定義 (関数や変数) は失われています。 ですから、より長いプログラムを書きたいなら、 テキストエディタを使ってインタプリタへの入力を用意しておき、手作業の代わりにフ ... ません -- もしくは、その場で手直ししてテストしたいモジュールが 1 つだった場合には、例えば import importlib; importlib.reload(modulename) のように importlib.reload() を使ってください。 6.1.1. モジュールをスクリプトとして実行する Python モジュールを python fib ...
https://man.mtool.work/python/3.14/tutorial/modules.html
1. Extending Python with C or C++ 7870
1. Extending Python with C or C++ It is quite easy to add new built-in modules to Python, if you know how to program in C. Such extension modules can do two things that can't be done directly in Python: they can implement new built-in objec ... e.c . (Historically, if a module is called spam , the C file containing its implementation is called spammodule.c ; if the module name is very long, like spammify , the module name can be just spammify.c .) The first two lines of our file can be: #define P ... ule と区別する現実的な方法はありません。 特に、 C API を公開するための Capsule には次のルールに従った名前を付けるべきです: modulename . attributename PyCapsule_Import() という便利関数は、 Capsule の名前がこのルールに一致しているときにのみ、簡単に Capsule 経 ...
https://man.mtool.work/python/3.14/extending/extending.html
プログラミング FAQ 7870
プログラミング FAQ 一般的な質問 ブレークポイントやステップ実行ができる、ソースコードレベルのデバッガはありますか? はい。 Python 用のデバッガについては次に解説してあり、組み込みの breakpoint() 関数でそれらのデバッガに処理を移せます。 pdb モジ ... インパターンを実装することの基礎でもあります。 モジュールで import を使う際の「ベストプラクティス」は何ですか? 一般的に from modulename import * を使ってはいけません。そのようにするとインポータの名前空間は汚染され、linter が未定義の名前を発見することが難しく ...
https://man.mtool.work/python/3.14/faq/programming.html
PREV 1 NEXT