7 from sys
import version_info
as _swig_python_version_info
8 if _swig_python_version_info < (2, 7, 0):
9 raise RuntimeError(
'Python 2.7 or later required')
12 pkg = __name__.rpartition(
'.')[0]
13 mname =
'.'.join((pkg,
'_Pltk_init')).lstrip(
'.')
15 return importlib.import_module(mname)
17 return importlib.import_module(
'_Pltk_init')
19 del swig_import_helper
20 del _swig_python_version_info
23 import builtins
as __builtin__
29 return self.this.own(value)
31 if type(value).__name__ ==
'SwigPyObject':
32 self.__dict__[name] = value
34 method = class_type.__swig_setmethods__.get(name,
None)
36 return method(self, value)
38 object.__setattr__(self, name, value)
40 raise AttributeError(
"You cannot add attributes to %s" % self)
49 return self.this.own()
50 method = class_type.__swig_getmethods__.get(name,
None)
53 raise AttributeError(
"'%s' object has no attribute '%s'" % (class_type.__name__, name))
58 strthis =
"proxy of " + self.this.__repr__()
59 except __builtin__.Exception:
61 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
65 def set_instance_attr(self, name, value):
69 set(self, name, value)
70 elif hasattr(self, name)
and isinstance(getattr(type(self), name), property):
71 set(self, name, value)
73 raise AttributeError(
"You cannot add instance attributes to %s" % self)
74 return set_instance_attr
78 def set_class_attr(cls, name, value):
79 if hasattr(cls, name)
and not isinstance(getattr(cls, name), property):
82 raise AttributeError(
"You cannot add class attributes to %s" % cls)
87 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" 89 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
94 """Meta class to enforce nondynamic attributes (no new attributes) for a class""" 100 return _Pltk_init.Pltk_init(x)
101 Pltk_init = _Pltk_init.Pltk_init
def _swig_setattr_nondynamic_class_variable(set)
def _swig_setattr(self, class_type, name, value)
def _swig_setattr_nondynamic(self, class_type, name, value, static=1)
def _swig_add_metaclass(metaclass)
def _swig_getattr(self, class_type, name)
def _swig_setattr_nondynamic_instance_variable(set)