MCPcopy Create free account
hub / github.com/kiibohd/controller / FileLoader

Class FileLoader

Scan/TestIn/interface.py:33–49  ·  view source on GitHub ↗

Modified version of FileLoader from Python 3.3

Source from the content-addressed store, hash-verified

31
32# Maintains compatibility to Python 3.2
33class FileLoader:
34 '''
35 Modified version of FileLoader from Python 3.3
36 '''
37 def __init__( self, fullname, path ):
38 self.name = fullname
39 self.path = path
40
41 def load_module( self, fullname ):
42 return super( FileLoader, self ).load_module( fullname )
43
44 def get_filename( self, fullname ):
45 return self.path
46
47 def get_data( self, path ):
48 with io.FileIO( path, 'r' ) as file:
49 return file.read()
50
51class CustomLoader( FileLoader, SourceLoader ):
52 '''

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…