MCPcopy Create free account
hub / github.com/ExpressLRS/ExpressLRS / write

Function write

src/python/external/six.py:765–776  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

763 return
764
765 def write(data):
766 if not isinstance(data, basestring):
767 data = str(data)
768 # If the file has an encoding, encode unicode with it.
769 if (isinstance(fp, file) and
770 isinstance(data, unicode) and
771 fp.encoding is not None):
772 errors = getattr(fp, "errors", None)
773 if errors is None:
774 errors = "strict"
775 data = data.encode(fp.encoding, errors)
776 fp.write(data)
777 want_unicode = False
778 sep = kwargs.pop("sep", None)
779 if sep is not None:

Callers 2

print_Function · 0.85
servoCalcAllChannelsFunction · 0.85

Calls 2

encodeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected