PLplot 5.15.0
Loading...
Searching...
No Matches
Pltk_init.py
Go to the documentation of this file.
1# This file was automatically generated by SWIG (https://www.swig.org).
2# Version 4.5.0
3#
4# Do not make changes to this file unless you know what you are doing - modify
5# the SWIG interface file instead.
6
7import typing
8# Import the low-level C/C++ module
9if getattr(globals().get("__spec__"), "parent", None) or __package__ or "." in __name__:
10 from . import _Pltk_init
11else:
12 import _Pltk_init
13
14import builtins as __builtin__
15
16def _swig_repr(self):
17 try:
18 strthis = "proxy of " + self.this.__repr__()
19 except __builtin__.Exception:
20 strthis = ""
21 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
22
23
25 def set_instance_attr(self, name, value):
26 if name == "this":
27 set(self, name, value)
28 elif name == "thisown":
29 self.this.own(value)
30 elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
31 set(self, name, value)
32 else:
33 raise AttributeError("You cannot add instance attributes to %s" % self)
34 return set_instance_attr
35
36
38 def set_class_attr(cls, name, value):
39 if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
40 set(cls, name, value)
41 else:
42 raise AttributeError("You cannot add class attributes to %s" % cls)
43 return set_class_attr
44
45
47 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
48 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
49
50
51
52def Pltk_init(x):
53 return _Pltk_init.Pltk_init(x)
54
_swig_repr(self)
Definition Pltk_init.py:16
_swig_setattr_nondynamic_instance_variable(set)
Definition Pltk_init.py:24
_swig_setattr_nondynamic_class_variable(set)
Definition Pltk_init.py:37