cpyHook.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # This file was automatically generated by SWIG (http://www.swig.org).
  2. # Version 1.3.36
  3. #
  4. # Don't modify this file, modify the SWIG interface instead.
  5. # This file is compatible with both classic and new-style classes.
  6. import _cpyHook
  7. import new
  8. new_instancemethod = new.instancemethod
  9. try:
  10. _swig_property = property
  11. except NameError:
  12. pass # Python < 2.2 doesn't have 'property'.
  13. def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
  14. if (name == "thisown"): return self.this.own(value)
  15. if (name == "this"):
  16. if type(value).__name__ == 'PySwigObject':
  17. self.__dict__[name] = value
  18. return
  19. method = class_type.__swig_setmethods__.get(name,None)
  20. if method: return method(self,value)
  21. if (not static) or hasattr(self,name):
  22. self.__dict__[name] = value
  23. else:
  24. raise AttributeError("You cannot add attributes to %s" % self)
  25. def _swig_setattr(self,class_type,name,value):
  26. return _swig_setattr_nondynamic(self,class_type,name,value,0)
  27. def _swig_getattr(self,class_type,name):
  28. if (name == "thisown"): return self.this.own()
  29. method = class_type.__swig_getmethods__.get(name,None)
  30. if method: return method(self)
  31. raise AttributeError,name
  32. def _swig_repr(self):
  33. try: strthis = "proxy of " + self.this.__repr__()
  34. except: strthis = ""
  35. return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
  36. import types
  37. try:
  38. _object = types.ObjectType
  39. _newclass = 1
  40. except AttributeError:
  41. class _object : pass
  42. _newclass = 0
  43. del types
  44. cGetKeyState = _cpyHook.cGetKeyState
  45. cSetHook = _cpyHook.cSetHook
  46. cUnhook = _cpyHook.cUnhook