1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-18 23:35:01 -05:00
Simba/Projects/MMLLib/test.py
Merlijn Wajer cf92c0242c First libmml code... A lot will have to change under the hood to make it fully
functional, but the code seems to work in the library.
Woohoo!
2010-03-26 01:36:09 +01:00

20 lines
300 B
Python
Executable File

#!/usr/bin/env python
from ctypes import *
dll = CDLL('./libmml.so')
dll.test.restype = c_char_p
a = dll.test()
print a
dll.init.restype = None
dll.init()
class POINT(Structure):
_fields_ = [('x', c_int),
('y', c_int)]
dll.getmousepos.restype = POINT
b = dll.getmousepos()
print b.x, b.y