Class PyModule

java.lang.Object
org.python.core.PyObject
org.python.core.PyModule
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PyModuleDerived

public class PyModule extends PyObject
See Also:
  • Field Details

  • Constructor Details

    • PyModule

      public PyModule()
    • PyModule

      public PyModule(PyType subType)
    • PyModule

      public PyModule(PyType subType, String name)
    • PyModule

      public PyModule(String name)
    • PyModule

      public PyModule(String name, PyObject dict)
  • Method Details

    • typeSetup

      public static void typeSetup(PyObject dict, PyType.Newstyle marker)
    • fastGetDict

      public PyObject fastGetDict()
      Description copied from class: PyObject
      xxx implements where meaningful
      Overrides:
      fastGetDict in class PyObject
      Returns:
      internal object per instance dict or null
    • getDict

      public PyObject getDict()
      Description copied from class: PyObject
      xxx implements where meaningful
      Overrides:
      getDict in class PyObject
      Returns:
      internal object __dict__ or null
    • setDict

      public void setDict(PyObject newDict)
      Overrides:
      setDict in class PyObject
    • delDict

      public void delDict()
      Overrides:
      delDict in class PyObject
    • getDoc

      public PyObject getDoc()
      Overrides:
      getDoc in class PyObject
    • __findattr__

      public PyObject __findattr__(String attr)
      Description copied from class: PyObject
      A variant of the __findattr__ method which accepts a Java String as the name. Warning: name must be an interned string!
      Overrides:
      __findattr__ in class PyObject
      Parameters:
      attr - the name to lookup in this namespace must be an interned string .
      Returns:
      the value corresponding to name or null if name is not found
      See Also:
    • __setattr__

      public void __setattr__(String attr, PyObject value)
      Description copied from class: PyObject
      A variant of the __setattr__ method which accepts a String as the key. This String must be interned.
      Overrides:
      __setattr__ in class PyObject
      Parameters:
      attr - the name whose value will be set - must be an interned string .
      value - the value to set this name to
      See Also:
    • __delattr__

      public void __delattr__(String attr)
      Description copied from class: PyObject
      A variant of the __delattr__ method which accepts a String as the key. This String must be interned. By default, this will call __delattr__(PyString name) with the appropriate args. The only reason to override this method is for performance.
      Overrides:
      __delattr__ in class PyObject
      Parameters:
      attr - the name which will be removed - must be an interned string .
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class PyObject
    • __dir__

      public PyObject __dir__()
      Description copied from class: PyObject
      Equivalent to the standard Python __dir__ method.
      Overrides:
      __dir__ in class PyObject
      Returns:
      a list of names defined by this object.