Méthode | Description | |
---|---|---|
Import ( CodeContext context, string fullName, PythonTuple from, int level ) : object |
Gateway into importing ... called from Ops. Performs the initial import of a module and returns the module.
|
|
ImportFrom ( CodeContext context, object from, string name ) : object |
Gateway into importing ... called from Ops. This is called after importing the module and is used to return individual items from the module. The outer modules dictionary is then updated with the result.
|
|
ImportModule ( CodeContext context, object globals, string modName, bool bottom, int level ) : object |
Called by the __builtin__.__import__ functions (general importing) and ScriptEngine (for site.py) level indiciates whether to perform absolute or relative imports. -1 indicates both should be performed 0 indicates only absolute imports should be performed Positive numbers indicate the # of parent directories to search relative to the calling module
|
|
ReloadModule ( CodeContext context, |
Méthode | Description | |
---|---|---|
CreateFullName ( string baseName, string name ) : string | ||
ExecuteSourceUnit ( IronPython.Runtime.PythonContext context, SourceUnit sourceUnit ) : |
||
FindAndLoadModuleFromImporter ( CodeContext context, object importer, string fullName, List path, object &ret ) : bool |
Given a user defined importer object as defined in PEP 302 tries to load a module. First the find_module(fullName, path) is invoked to get a loader, then load_module(fullName) is invoked
|
|
FindImportFunction ( CodeContext context ) : object | ||
FindImporterForPath ( CodeContext context, string dirname ) : object |
Finds a user defined importer for the given path or returns null if no importer handles this path.
|
|
GetFullPathAndValidateCase ( Microsoft.Scripting.LanguageContext context, string path, bool isDir ) : string | ||
GetParentPackageName ( int level, string names ) : string | ||
GetParentPathAndModule ( CodeContext context, string parentModuleName, |
Given the parent module name looks up the __path__ property.
|
|
ImportBuiltin ( CodeContext context, string name ) : object | ||
ImportFromPath ( CodeContext context, string name, string fullName, List path ) : object | ||
ImportFromPathHook ( CodeContext context, string name, string fullName, List path, Func |
||
ImportLightThrow ( CodeContext context, string fullName, PythonTuple from, int level ) : object | ||
ImportModuleFrom ( CodeContext context, object from, string name ) : object | ||
ImportNestedModule ( CodeContext context, |
||
ImportReflected ( CodeContext context, string name ) : object | ||
ImportTopAbsolute ( CodeContext context, string name ) : object | ||
IsReflected ( object module ) : bool | ||
LoadFromDisk ( CodeContext context, string name, string fullName, string str ) : object | ||
LoadFromSourceUnit ( CodeContext context, SourceUnit sourceCode, string name, string path ) : |
||
LoadModuleFromSource ( CodeContext context, string name, string path ) : |
||
LoadPackageFromSource ( CodeContext context, string name, string path ) : |
||
MemberTrackerToPython ( CodeContext context, object ret ) : object | ||
ReloadBuiltinModule ( CodeContext context, |
||
ReloadModule ( CodeContext context, |
||
TryFindSourceFile ( IronPython.Runtime.PythonContext context, string name ) : SourceUnit | ||
TryGetExistingModule ( CodeContext context, string fullName, object &ret ) : bool | ||
TryGetExistingOrMetaPathModule ( CodeContext context, string fullName, List path, object &ret ) : bool |
Trys to get an existing module and if that fails fall backs to searching
|
|
TryGetNameAndPath ( CodeContext context, object globals, string name, int level, string package, string &full, List &path, |
Interrogates the importing module for __name__ and __path__, which determine whether the imported module (whose name is 'name') is being imported as nested module (__path__ is present) or as sibling. For sibling import, the full name of the imported module is parent.sibling For nested import, the full name of the imported module is parent.module.nested where parent.module is the mod.__name__
|
|
TryGetNestedModule ( CodeContext context, |
||
TryImportSourceFile ( IronPython.Runtime.PythonContext context, string name ) : |
||
TryLoadMetaPathModule ( CodeContext context, string fullName, List path, object &ret ) : bool |
Attempts to load a module from sys.meta_path as defined in PEP 302. The meta_path provides a list of importer objects which can be used to load modules before searching sys.path but after searching built-in modules.
|
public static Import ( CodeContext context, string fullName, PythonTuple from, int level ) : object | ||
context | CodeContext | |
fullName | string | |
from | PythonTuple | |
level | int | |
Résultat | object |
public static ImportFrom ( CodeContext context, object from, string name ) : object | ||
context | CodeContext | |
from | object | |
name | string | |
Résultat | object |
public static ImportModule ( CodeContext context, object globals, string modName, bool bottom, int level ) : object | ||
context | CodeContext | |
globals | object | |
modName | string | |
bottom | bool | |
level | int | |
Résultat | object |
public static ReloadModule ( CodeContext context, |
||
context | CodeContext | |
module | ||
Résultat | object |