Skip to content

Instantly share code, notes, and snippets.

@zeffii
Forked from anonymous/ctype_testing.py
Created May 8, 2014 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeffii/300430353ed5cbe2a103 to your computer and use it in GitHub Desktop.
Save zeffii/300430353ed5cbe2a103 to your computer and use it in GitHub Desktop.
from ctypes import Structure, c_float
class Point(Structure):
_fields_ = [("x", c_float), ("y", c_float)]
def __repr__(self):
return str(self.x) + ", " + str(self.y)
a = Point(30.0, 40.0)
print(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment