Created
June 15, 2012 19:45
-
-
Save perone/2938394 to your computer and use it in GitHub Desktop.
libxpto ctypes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- encoding: utf-8 -*- | |
from ctypes import * | |
iLib = cdll.LoadLibrary('./libXPTO.so') | |
iLib.getData.argtypes = [ c_char_p, c_char_p ] | |
iLib.getData.restype = c_int | |
sInfo = create_string_buffer(1500) | |
Ret = iLib.getData("390+13", sInfo) | |
print ret | |
print sInfo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment