MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / as_byte_array

Function as_byte_array

src/ext/makerbot_pyserial/serialcli.py:23–24  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

21# to byte arrays
22sab = System.Array[System.Byte]
23def as_byte_array(string):
24 return sab([ord(x) for x in string]) # XXX will require adaption when run with a 3.x compatible IronPython
25
26class IronSerial(SerialBase):
27 """Serial port implemenation for .NET/Mono."""

Callers 1

writeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected