MCPcopy Create free account
hub / github.com/ahupp/python-magic / load

Method load

magic/compat.py:181–189  ·  view source on GitHub ↗

Must be called to load entries in the colon separated list of database files passed as argument or the default database file if no argument before any magic queries can be performed. Returns 0 on success and -1 on failure.

(self, filename=None)

Source from the content-addressed store, hash-verified

179 return _setflags(self._magic_t, flags)
180
181 def load(self, filename=None):
182 """
183 Must be called to load entries in the colon separated list of database
184 files passed as argument or the default database file if no argument
185 before any magic queries can be performed.
186
187 Returns 0 on success and -1 on failure.
188 """
189 return _load(self._magic_t, Magic.__tobytes(filename))
190
191 def compile(self, dbs):
192 """

Callers 1

compat.pyFile · 0.80

Calls 1

__tobytesMethod · 0.80

Tested by

no test coverage detected