Package org.python.core

Examples of org.python.core.PyStringMap.keys()


                }*/

            }
            if (mLocals instanceof PyStringMap) {
                PyStringMap locals = (PyStringMap) mLocals;
                PyList keys = locals.keys();
                Iterator<?> localIt = keys.iterator();
                while (localIt.hasNext()) {
                    Object oMap = localIt.next();
                    if (oMap instanceof String) {
                        String localKey = (String) oMap;
View Full Code Here


            boolean exclpkgs) {
        PyStringMap dict = jpkg.__dict__;
        PyStringMap cls = jpkg.clsSet;

        if (!instantiate) {
            PyList ret = cls.keys();
            PyList dictKeys = dict.keys();

            for (PyObject name : dictKeys.asIterable()) {
                if (!cls.has_key(name)) {
                    if (exclpkgs && dict.get(name) instanceof PyJavaPackage)
View Full Code Here

            }

            return ret;
        }

        for (PyObject pyname : cls.keys().asIterable()) {
            if (!dict.has_key(pyname)) {
                String name = pyname.toString();
                jpkg.addClass(name, Py.findClass(jpkg.__name__ + "." + name));
            }
        }
View Full Code Here

            protected PyObject parseFileContents(InputStream in) throws IOException {
                PythonInterpreter pi = PythonFormatAdapter.this.py.interpreter();
                pi.execfile(in);
               
                PyStringMap locals = (PyStringMap) pi.getLocals();
                for (Object o : locals.keys()) {
                    String key = (String) o;
                    PyObject obj = locals.__getitem__(key);
                    if (obj instanceof PyFunction ) {
                        try {
                            if (obj.__getattr__(getMarker()) != null) {
View Full Code Here

                PythonInterpreter pi = py.interpreter();
                pi.execfile(in);

                Map<String,PyObject> processes = new LinkedHashMap();
                PyStringMap locals = (PyStringMap) pi.getLocals();
                for (Object o : locals.keys()) {
                    String key = (String) o;
                    PyObject obj = locals.__getitem__(key);
                    if (obj instanceof PyFunction ) {
                        try {
                            if (obj.__getattr__("__process__") != null) {
View Full Code Here

                PythonInterpreter pi = PythonFilterFunctionAdapter.this.py.interpreter();
                pi.execfile(in);
               
                Map<String,PyObject> functions = new LinkedHashMap();
                PyStringMap locals = (PyStringMap) pi.getLocals();
                for (Object o : locals.keys()) {
                    String key = (String) o;
                    PyObject obj = locals.__getitem__(key);
                    try {
                        if (obj.__getattr__("__filter_function__") != null) {
                            functions.put(key, obj);
View Full Code Here

                PythonInterpreter pi = PythonFilterFunctionAdapter.this.py.interpreter();
                pi.execfile(in);
               
                Map<String,PyObject> functions = new LinkedHashMap();
                PyStringMap locals = (PyStringMap) pi.getLocals();
                for (Object o : locals.keys()) {
                    String key = (String) o;
                    PyObject obj = locals.__getitem__(key);
                    try {
                        if (obj.__getattr__("__filter_function__") != null) {
                            functions.put(key, obj);
View Full Code Here

                PythonInterpreter pi = py.interpreter();
                pi.execfile(in);

                Map<String,PyObject> processes = new LinkedHashMap();
                PyStringMap locals = (PyStringMap) pi.getLocals();
                for (Object o : locals.keys()) {
                    String key = (String) o;
                    PyObject obj = locals.__getitem__(key);
                    if (obj instanceof PyFunction ) {
                        try {
                            if (obj.__getattr__("__process__") != null) {
View Full Code Here

            protected PyObject parseFileContents(InputStream in) throws IOException {
                PythonInterpreter pi = PythonFormatAdapter.this.py.interpreter();
                pi.execfile(in);
               
                PyStringMap locals = (PyStringMap) pi.getLocals();
                for (Object o : locals.keys()) {
                    String key = (String) o;
                    PyObject obj = locals.__getitem__(key);
                    if (obj instanceof PyFunction ) {
                        try {
                            if (obj.__getattr__(getMarker()) != null) {
View Full Code Here

 
  private PyObject getKnownClass(String callChain) {
    PyObject result = null;
   
    PyStringMap map = (PyStringMap) myInterpreter.getLocals();
    PyList keys = (PyList) map.keys();
    PyObject iter = keys.__iter__();

    for (PyObject item; (item = iter.__iternext__()) != null && result == null; ) {
      if (item.toString().equals(callChain) && (map.get(item) instanceof PyJavaType || map.get(item) instanceof PyClass)) {
        result = (PyObject) map.get(item);
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.