MCPcopy
hub / github.com/mne-tools/mne-python / _file_like

Function _file_like

mne/utils/misc.py:346–353  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

344
345
346def _file_like(obj):
347 # An alternative would be::
348 #
349 # isinstance(obj, (TextIOBase, BufferedIOBase, RawIOBase, IOBase))
350 #
351 # but this might be more robust to file-like objects not properly
352 # inheriting from these classes:
353 return all(callable(getattr(obj, name, None)) for name in ("read", "seek"))
354
355
356def _fullname(obj, *, referent=None):

Callers 10

_fiff_get_fidFunction · 0.85
start_fileFunction · 0.85
_get_fname_repFunction · 0.85
__init__Method · 0.85
_read_raw_fileMethod · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
_check_argsFunction · 0.85
_gdf_edf_get_fidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected