Skip to content

Instantly share code, notes, and snippets.

@perone
Created June 15, 2012 19:45
Show Gist options
  • Save perone/2938394 to your computer and use it in GitHub Desktop.
Save perone/2938394 to your computer and use it in GitHub Desktop.
libxpto ctypes
#!/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