Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ctypes as C
- lib_path = './'
- lib_name = 'ct.dylib'
- print('loading dll... from ' + str(lib_path) + str(lib_name))
- myclib = C.CDLL(lib_path + lib_name)
- print('loaded')
- genTest = myclib.genTest
- genTest.argtypes = [C.c_char_p]
- genTest.restype = C.c_int
- print('test start')
- res = genTest(C.c_char_p(str("abc")))
- print ('test half done')
- res = genTest(C.c_char_p(None))
- print ('test successful')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement