MCPcopy Create free account
hub / github.com/cppla/ServerStatus / byte_str

Function byte_str

clients/client-linux.py:431–442  ·  view source on GitHub ↗

bytes to str, str to bytes :param object: :return:

(object)

Source from the content-addressed store, hash-verified

429 time.sleep(interval)
430
431def byte_str(object):
432 '''
433 bytes to str, str to bytes
434 :param object:
435 :return:
436 '''
437 if isinstance(object, str):
438 return object.encode(encoding="utf-8")
439 elif isinstance(object, bytes):
440 return bytes.decode(object)
441 else:
442 print(type(object))
443
444if __name__ == '__main__':
445 for argc in sys.argv:

Callers 1

client-linux.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected