PLplot  5.15.0
Pltk_init.py
Go to the documentation of this file.
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 4.0.1
3 #
4 # Do not make changes to this file unless you know what you are doing--modify
5 # the SWIG interface file instead.
6 
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")
10 
11 # Import the low-level C/C++ module
12 if __package__ or "." in __name__:
13  from . import _Pltk_init
14 else:
15  import _Pltk_init
16 
17 try:
18  import builtins as __builtin__
19 except ImportError:
20  import __builtin__
21 
22 def _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 
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 
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 
52 def _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 
59 class _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 def Pltk_init(x):
66  return _Pltk_init.Pltk_init(x)
67 
68 
Pltk_init.Pltk_init
def Pltk_init(x)
Definition: Pltk_init.py:65
Pltk_init._swig_setattr_nondynamic_class_variable
def _swig_setattr_nondynamic_class_variable(set)
Definition: Pltk_init.py:43
Pltk_init._swig_setattr_nondynamic_instance_variable
def _swig_setattr_nondynamic_instance_variable(set)
Definition: Pltk_init.py:30
Pltk_init._SwigNonDynamicMeta
Definition: Pltk_init.py:59
Pltk_init._swig_add_metaclass
def _swig_add_metaclass(metaclass)
Definition: Pltk_init.py:52
Pltk_init._swig_repr
def _swig_repr(self)
Definition: Pltk_init.py:22