Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/xmlhandler/datum/datum.py   pyHMSA(Download)
# Local modules.
from pyhmsa.spec.condition.conditions import Conditions
from pyhmsa.fileformat.xmlhandler.xmlhandler import \
    _XMLHandler, DTYPES_LOOKUP_PARSE, DTYPES_LOOKUP_CONVERT
 
    def _convert_datum_type(self, obj):
        element = etree.Element('DatumType')
        element.text = DTYPES_LOOKUP_CONVERT[obj.dtype]
        element.set('SizeInBytes', str(obj.dtype.itemsize))
        return [element]