Advertisement
Guest User

Untitled

a guest
Jun 8th, 2018
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. class eH():
  2. x= c_uint(0)
  3. print (type(x) == c_uint)
  4. #print (asdf.dir())
  5. print (type(eH.x) == c_uint)
  6. print (eH.x)
  7. print (type(eH.x))
  8. print (type(eH.x) == c_ulong)
  9. print (c_uint == c_ulong)
  10. print (c_int == c_long)
  11. #print (c_ushort == c_uint)
  12. print ("\nEnd of eH prints\n#####")
  13.  
  14. class eHardware(Structure):
  15. _fields_= [("xyz", c_uint)]
  16. a= eHardware()
  17. a.xyz= eH.x
  18. print (a.xyz)
  19. print (a.xyz == eH.x)
  20. print (type(a.xyz))
  21. print (type(c_uint(a.xyz)))
  22.  
  23. ## Below is the terminal output
  24. True
  25. True
  26. c_ulong(0)
  27. <class 'ctypes.c_ulong'>
  28. True
  29. True
  30. True
  31.  
  32. End of eH prints
  33. #####
  34. 0
  35. False
  36. <class 'int'>
  37. <class 'ctypes.c_ulong'>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement