I recently started programming macros for a microscope that is controlled by ZEN Blue from Zeiss. The Zeiss macro environment uses IronPython 2.7.2.1. I need to write out a hdf5 file, but unfortunately hdf5 support for IronPython is quite bad.
The data I want to transfer is of type Array[Byte] which seems to be somehow connected to the CLR of .NET:
print "length: %i type: %s" %(len(data), type(data))
gives:
length: 4915200 type: <type 'Array[Byte]'>
I can sucessfully transfer a dict containing ints and Strings to a python server using pickle via a socket connection (suggested here). However, when I try to unpickle the Array[Byte]
data, python wants to import the CLR, which of course fails:
ImportError: No module named clr
Question: What is the best (fastest) way to convert the .NET Array[Byte] to a basic python type/object which is not linked to the .NET clr?
many thanks, Dominic