Results of 1 - 10 of about 77 for Modules (0.004 sec.)
- modulefinder --- スクリプト中で使用されているモジュールの検索 11852
- modulefinder --- スクリプト中で使用されているモジュールの検索 ソースコード: Lib/modulefinder.py このモジュールでは、スクリプト中で import されているモジュールセットを調べるために使える ModuleFinder クラスを提供しています。 modulefinder.py は
...cript ( pathname ) pathname に指定したファイルの内容を解析します。ファイルには Python コードが入っていなければなりません。 modules モジュール名をモジュールに結びつける辞書。 ModuleFinder の使用例 を参照して下さい。 ModuleFinder の使用例 解析対象のスクリ...プトです: from modulefinder import ModuleFinder finder = ModuleFinder () finder . run_script ( 'bacon.py' ) print ( 'Loaded modules:' ) for name , mod in finder . modules . items (): print ( ' %s : ' % name , end = '' ) print ( ',' . join ( list ( mod ....globalnames . keys ())[: 3 ])) print ( '-' * 50 ) print ( 'Modules not imported:' ) print ( ' \n ' . join ( finder . badmodules . keys ())) 出力例です (アーキテクチャに依って違ってくるかもし... - https://man.mtool.work/python/3.14/library/modulefinder.html
- Superseded Modules 11852
- Superseded Modules この章で説明するモジュールは、ほとんどの用途で他のモジュールに置き換えられており、主に後方互換性を保つために残されています。 この章には、問題の限られた範囲だけを扱い、標準ライブラリの別の場所にもっと広く適用できる解決策が
...se や argparse が提供する、より幅広いコマンドラインオプションや引数の解析機能を提供するものではありません。 Alternatively, modules may appear in this chapter because they are deprecated outright, and awaiting removal in a future release, or they are sof...t deprecated and their use is actively discouraged in new projects. With the removal of various obsolete modules through PEP 594 , there are currently no modules in this latter category. getopt --- C 形式のコマンドラインオプション解析...他のマニュアルの関連ページ Linux JM getopt(1) PHP getopt() Linux JM getopt(3) Linux JM igawk(1) Linux JM modules.dep(5) Linux JM depmod(8)... - https://man.mtool.work/python/3.14/library/superseded.html
- 5. インポートシステム 11451
- 5. インポートシステム ある 1 つの module にある Python コードから他のモジュールを インポート することで、そこにあるコードへアクセスできるようになります。 import 文はインポート機構を動かす最も一般的な方法ですが、それが唯一の方法ではありません
...接呼び出すとモジュールの検索のみが行われ、見つかった場合、モジュールの作成処理が行われます。親パッケージのインポートや ( sys.modules を含む) 様々なキャッシュの更新などの副作用は起きるかもしれませんが、 import 文のみが名前束縛処理を行います。 import 文が実...トに失敗した場合は、 ModuleNotFoundError が送出されます。 5.3.1. モジュールキャッシュ インポート検索で最初に調べる場所は sys.modules です。このマッピングは、中間のパスを含む、これまでにインポートされたすべてのモジュールのキャッシュを提供します。なので foo....bar.baz がインポート済みの場合、 sys.modules は foo 、 foo.bar 、 foo.bar.baz のエントリーを含みます。それぞれのキーはその値として対応するモジュールオブジェクトを持ちま... - https://man.mtool.work/python/3.14/reference/import.html
- 拡張モジュールの定義 10940
- 拡張モジュールの定義 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
...creation process into several phases: Before any substantial code is executed, Python can determine which capabilities the module supports, and it can adjust the environment or refuse loading an incompatible extension. By default, Python itself creates...ージョン 3.5 で変更: 多段階初期化 ( PEP 489 ) のサポートを追加しました。 複数のモジュールインスタンス By default, extension modules are not singletons. For example, if the sys.modules entry is removed and the module is re-imported, a new module object is...method and type objects. The old module is subject to normal garbage collection. This mirrors the behavior of pure-Python modules. サブインタープリタ 内や、Python ランタイムの再初期化 ( Py_Finalize() と Py_Initialize() ) 後にも、追加のモジュールインスタ... - https://man.mtool.work/python/3.14/c-api/extension-modules.html
- importlib --- import の実装 9835
- importlib --- import の実装 Added in version 3.1. ソースコード: Lib/importlib/__init__.py はじめに importlib パッケージには 3 つの目的があります。 1 つ目は import 文 (ひいては __import__() 関数) の実装を Python のソースコードで提供することで
...リファレンス。 Packages specification パッケージの元の仕様。幾つかの動作はこの仕様が書かれた頃から変更されています (例: sys.modules で None に基づくリダイレクト)。 __import__() 関数 import 文はこの関数のシンタックスシュガーです。 sys.path モジュール検索パ...ポート PEP 366 main モジュールの明示的な相対インポート PEP 420 暗黙的な名前空間パッケージ PEP 451 インポートシステムのための ModuleSpec 型 PEP 488 PYO ファイルの撤廃 PEP 489 複数フェーズでの拡張モジュールの初期化 PEP 552 決定論的 pyc PEP 3120 デフォルトの...なく新しいバージョンを試したい際に便利です。戻り値はモジュールオブジェクトです。 (もし再インポートが異なるオブジェクトを sys.modules に配置したら、元の module とは異なるかもしれません。) reload() が実行された場合: Python モジュールのコードは再コンパイルさ... - https://man.mtool.work/python/3.14/library/importlib.html
- 1. Extending Python with C or C++ 9434
- 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
...ur system setup; details are given in later chapters. 注釈 The C extension interface is specific to CPython, and extension modules do not work on other Python implementations. In many cases, it is possible to avoid writing C extensions and preserve port...or system calls, you should consider using the ctypes module or the cffi library rather than writing custom C code. These modules let you write Python code to interface with C code and are more portable between implementations of Python than writing an...the platform, and for C++ declares the function as extern "C" . PyInit_spam() is called when each interpreter imports its module spam for the first time. (See below for comments about embedding Python.) A pointer to the module definition must be return... - https://man.mtool.work/python/3.14/extending/extending.html
- Python インタプリタの拡張と埋め込み 9338
- Python インタプリタの拡張と埋め込み This document describes how to write modules in C or C++ to extend the Python interpreter with new modules. Those modules can not only define new functions but also new object types and their methods. The
...interpreter in another application, for use as an extension language. Finally, it shows how to compile and link extension modules so that they can be loaded dynamically (at run time) into the interpreter, if the underlying operating system supports thi...るコンパイルとリンク 他のマニュアルの関連ページ PHP ffi.installation PHP install.pie PHP com.requirements PHP dl() Linux JM modules.dep(5) PHP fdf_set_version()... - https://man.mtool.work/python/3.14/extending/
- インタープリタの初期化と終了処理 8536
- インタープリタの初期化と終了処理 初期化前にインタープリタを設定する方法の詳細は、 Python の初期化設定 を参照してください。 Python の初期化前 Python を組み込むアプリケーションでは、一部の関数と グローバルな設定変数 を除き、ほかの Python/C AP
...に呼び出す必要があります。 少数の例外については Python の初期化前 を参照してください。 This initializes the table of loaded modules ( sys.modules ), and creates the fundamental modules builtins , __main__ and sys . It also initializes the module search p...Python が確保したメモリをアプリケーションの終了前に解放させたいと思う場合もあります。 Bugs and caveats: The destruction of modules and objects in modules is done in random order; this may cause destructors ( __del__() methods) to fail when they depend o...n other objects (even functions) or modules. Dynamically loaded extension modules loaded by Python are not unloaded. Small amounts of memory allocated by the Python i... - https://man.mtool.work/python/3.14/c-api/interp-lifecycle.html
- モジュールのインポート 8329
- モジュールのインポート PyObject * PyImport_ImportModule ( const char * name ) 戻り値: 新しい参照。 次に属します: Stable ABI . PyImport_Import() のラッパーで、引数として PyObject * の代わりに const char * を受け取ります。 PyObject * PyImport
...し、エラーの場合は例外を設定して NULL を返します。 エラーの場合、 PyImport_ExecCodeModule() の呼び出し時に name がすでに sys.modules に存在していたとしても、 sys.modules から name を削除します。 不完全に初期化されたモジュールを sys.modules に残すのは危険で...leWithPathnames() も参照してください。 バージョン 3.12 で変更: The setting of __cached__ and __loader__ is deprecated. See ModuleSpec for alternatives. PyObject * PyImport_ExecCodeModuleEx ( const char * name , PyObject * co , const char * pathname ) 戻...ons, this is the preferred one to use. Added in version 3.3. バージョン 3.12 で変更: Setting __cached__ is deprecated. See ModuleSpec for alternatives. PyObject * PyImport_ExecCodeModuleWithPathnames ( const char * name , PyObject * co , const char * pa... - https://man.mtool.work/python/3.14/c-api/import.html
- モジュールオブジェクト (module object) 8136
- モジュールオブジェクト (module object) PyTypeObject PyModule_Type 次に属します: Stable ABI . この PyTypeObject のインスタンスは Python のモジュール型を表します。 Python プログラムには types.ModuleType として公開されています。 int PyModule_C
...bject() を使用してください。 Module definitions The functions in the previous section work on any module object, including modules imported from Python code. Modules defined using the C API typically use a module definition , PyModuleDef -- a statically...allocated, constant “description" of how a module should be created. The definition is usually used to define an extension's “main” module object (see 拡張モジュールの定義 f...or details). It is also used to create extension modules dynamically . Unlike PyModule_New() , the definition allows management of module state -- a piece of memory that is alloca... - https://man.mtool.work/python/3.14/c-api/module.html