Examples of PyInstance


Examples of org.python.core.PyInstance

   * @return Python RPWorld implementation
   * @throws Exception
   */
  public PythonWorld getWorld() throws Exception {
    String pythonZoneClass = conf.get("python_script_world");
    PyInstance object = (PyInstance) interpreter.eval(pythonZoneClass + "()");
    return (PythonWorld) object.__tojava__(PythonWorld.class);
  }
View Full Code Here

Examples of org.python.core.PyInstance

   * @return Python IRPRuleProcessor implemenation
   * @throws Exception
   */
  public PythonRP getGameRules() throws Exception {
    String pythonRPClass = conf.get("python_script_ruleprocessor");
    PyInstance object = (PyInstance) interpreter.eval(pythonRPClass + "(gamescript__world)");
    return (PythonRP) object.__tojava__(PythonRP.class);
  }
View Full Code Here

Examples of org.python.core.PyInstance

    }

    private DebugVariable dumpPythonObject(Object value, DebugVariable debugVar) {
        if (value instanceof PyInstance) {
            PyInstance pyInstance = (PyInstance) value;
            Object javaInstance = pyInstance.__dir__().__tojava__(Object.class);
            debugVar = dumpPythonObject(javaInstance, debugVar);
            return debugVar;
        }
        if (value instanceof PyList) {
            PyList listValue = (PyList) value;
View Full Code Here

Examples of org.python.core.PyInstance

            PyObject klass = find_class(module, name);

            PyObject value = null;
            if (args.length == 0 && klass instanceof PyClass &&
                        klass.__findattr__("__getinitargs__") == null) {
                value = new PyInstance((PyClass)klass);
            } else {
                value = klass.__call__(args);
            }
            push(value);
        }
View Full Code Here

Examples of org.python.core.PyInstance

            pop();

            PyObject value = null;
            if (args.length == 0 && klass instanceof PyClass &&
                        klass.__findattr__("__getinitargs__") == null) {
                value = new PyInstance((PyClass)klass);
            } else {
                value = klass.__call__(args);
            }
            push(value);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.