[ctypes-users] python callind delphi
Brought to you by:
theller
From: Donald L. D. <dl...@en...> - 2004-06-26 15:39:15
|
I was given a lib_xx.so which I believe was written in Delphi, and ask to prepare a Python wrapper. One thing lead to another which eventually lead to ctpyes, which doesn't seem to do the job either. I an testing with: #!/usr/bin/python2 # # Lets make ctypes work with libBitLink # from ctypes import cdll import os, sys libBL = cdll.LoadLibrary("/home/dld/bitlink/BitLinkLib/libBitLink.so") libBL.BS_Init() f = libBL.BS_Open("TTY:/dev/ttys1") print f libBL.BS_Send(f, "?") print libBL.BS_Count(f) BS_Open always returns 0, whether I supply a valid device or make multiple calls on the same device. BS_Send apparently isn't effective either, as Count always reveals that zero bytes are being returned in response. Am I missing something? Suggestions? Don |