1# This file was automatically generated by SWIG (http://www.swig.org). 2# Version 4.0.2 3# 4# Do not make changes to this file unless you know what you are doing--modify 5# the SWIG interface file instead. 6 7from sys import version_info as _swig_python_version_info 8if _swig_python_version_info < (2, 7, 0): 9 raise RuntimeError("Python 2.7 or later required") 10 11# Pull in all the attributes from the low-level C/C++ module 12if __package__ or "." in __name__: 13 from ._m2crypto import * 14else: 15 from _m2crypto import * 16 17try: 18 import builtins as __builtin__ 19except ImportError: 20 import __builtin__ 21 22def _swig_repr(self): 23 try: 24 strthis = "proxy of " + self.this.__repr__() 25 except __builtin__.Exception: 26 strthis = "" 27 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 28 29 30def _swig_setattr_nondynamic_instance_variable(set): 31 def set_instance_attr(self, name, value): 32 if name == "thisown": 33 self.this.own(value) 34 elif name == "this": 35 set(self, name, value) 36 elif hasattr(self, name) and isinstance(getattr(type(self), name), property): 37 set(self, name, value) 38 else: 39 raise AttributeError("You cannot add instance attributes to %s" % self) 40 return set_instance_attr 41 42 43def _swig_setattr_nondynamic_class_variable(set): 44 def set_class_attr(cls, name, value): 45 if hasattr(cls, name) and not isinstance(getattr(cls, name), property): 46 set(cls, name, value) 47 else: 48 raise AttributeError("You cannot add class attributes to %s" % cls) 49 return set_class_attr 50 51 52def _swig_add_metaclass(metaclass): 53 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" 54 def wrapper(cls): 55 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) 56 return wrapper 57 58 59class _SwigNonDynamicMeta(type): 60 """Meta class to enforce nondynamic attributes (no new attributes) for a class""" 61 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) 62 63 64 65 66 67 68