Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
VFSLoader Class Reference

Public Member Functions

 __init__ (self, dir_path, vfile, filename, desc, packagePath=None)
 
 get_code (self, fullname)
 
 get_filename (self, fullname)
 
 get_source (self, fullname)
 
 getdata (self, path)
 
 is_package (self, fullname)
 
 load_module (self, fullname, loadingShared=False)
 

Public Attributes

 desc
 
 dir_path
 
 filename
 
 packagePath
 
 timestamp
 

Protected Member Functions

 _compile (self, filename, source)
 
 _import_extension_module (self, fullname)
 
 _import_frozen_module (self, fullname)
 
 _loadPyc (self, vfile, timestamp)
 
 _read_code (self)
 
 _read_source (self)
 

Detailed Description

 The second part of VFSImporter, this is created for a
particular .py file or directory. 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
dir_path,
vfile,
filename,
desc,
packagePath = None )

Member Function Documentation

◆ _compile()

_compile ( self,
filename,
source )
protected
 Compiles the Python source code to a code object and
attempts to write it to an appropriate .pyc file.  May raise
SyntaxError or other errors generated by the compiler. 

◆ _import_extension_module()

_import_extension_module ( self,
fullname )
protected
 Loads the binary shared object as a Python module, and
returns it. 

◆ _import_frozen_module()

_import_frozen_module ( self,
fullname )
protected
 Imports the frozen module without messing around with
searching any more. 

◆ _loadPyc()

_loadPyc ( self,
vfile,
timestamp )
protected
 Reads and returns the marshal data from a .pyc file.
Raises ValueError if there is a problem. 

◆ _read_code()

_read_code ( self)
protected
 Returns the Python compiled code object for this file, if
it is available, or None if it is not.  May raise IOError,
ValueError, SyntaxError, or a number of other errors generated
by the low-level system. 

◆ _read_source()

_read_source ( self)
protected
 Returns the Python source for this file, if it is
available, or None if it is not.  May raise IOError. 

◆ get_code()

get_code ( self,
fullname )

◆ get_filename()

get_filename ( self,
fullname )

◆ get_source()

get_source ( self,
fullname )

◆ getdata()

getdata ( self,
path )

◆ is_package()

is_package ( self,
fullname )

◆ load_module()

load_module ( self,
fullname,
loadingShared = False )

Member Data Documentation

◆ desc

desc

◆ dir_path

dir_path

◆ filename

filename

◆ packagePath

packagePath

◆ timestamp

timestamp