简体   繁体   中英

Loading registered dll from python

I have registered the xceedzip.dll (admin cmd run -> regsvr32 xceedzip.dll) I would like to access the .net classes inside this dll from python.

In particular, I need to uncompress a continuous data stream from a multicast feed. The data comes in a xceedzip compressed form, and require the uncompress method to be executed on the data to unpackage it. for reference: http://doc.xceedsoft.com/products/XceedSco/

Any pointers on how to achieve this would be appreciated. This won't have a 1-step ready ctypes solution to my understanding. This is because the Uncompress method lives in a class of a .net namespace.

I am informed that the win32com library might be able to achieve this, but would like some guidance before i put my nose to that grindstone.

Thanks,

I downloaded the trial for it, and this seems to work:

import win32com.client
x=win32com.client.Dispatch('Xceed.StreamingCompression')
compressed = x.Compress(buffer('bork bork bork aaaaa bbbbbbbb'), True)
decompressed = x.Decompress(compressed, True)
print decompressed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM