Examples of PyString


Examples of org.python.core.PyString

        PySystemState pySysStat = Py.getSystemState();

        // Add all "jarLocations/Lib" to sys.path
        if(jarLocations != null)
            for(String jarPath : jarLocations)
                pySysStat.path.append(new PyString(jarPath + "/Lib"));

        pyInterp.exec("from editorconfig import get_properties");
        pyInterp.exec("from editorconfig import exceptions");
    }
View Full Code Here

Examples of org.python.core.PyString

                  }
                  PySystemState  state = Py.getSystemState();
                  state.argv.clear();
                  if( argv != null ) {
                    for (String str : argv ) {
                      state.argv.append(new PyString(str));
                    }
                  } else {
                    LOG.warn(PigContext.PIG_CMD_ARGS_REMAINDERS
                      + " is empty. This is not expected unless on testing." );
                  }
View Full Code Here

Examples of org.python.core.PyString

                  }
                  PySystemState  state = Py.getSystemState();
                  state.argv.clear();
                  if( argv != null ) {
                    for (String str : argv ) {
                      state.argv.append(new PyString(str));
                    }
                  } else {
                    LOG.warn(PigContext.PIG_CMD_ARGS_REMAINDERS
                      + " is empty. This is not expected unless on testing." );
                  }
View Full Code Here

Examples of org.python.core.PyString

        String testRoot = getJythonTestRoot();
        String xmlReportFile = getOptionalXmlReportFilename();
        String ignoreFile = getOptionalIgnoreFile();

        PythonInterpreter interp = createInterpreterWithArgs(xmlReportFile, ignoreFile);
        interp.getSystemState().path.insert(0, new PyString(testRoot));

        LOGGER.info("About to call Jython test script: '" + testScript
                + "' with '" + testRoot + "' added to Jython path");

        int maxInvocations = Integer.getInteger(TEST_INVOCATIONS_SYSTEM_PROPERTY, 1);
View Full Code Here

Examples of org.python.core.PyString

    {
        PySystemState systemState = new PySystemState();

        if (xmlReportFile != null)
        {
            systemState.argv.append(new PyString("--xml"));
            systemState.argv.append(new PyString(xmlReportFile));
        }

        if(ignoreFile == null)
        {
            ignoreFile = System.getProperty(IGNORE_FILE_SYSTEM_PROPERTY);
        }

        if(ignoreFile != null)
        {
            systemState.argv.append(new PyString("-I"));
            systemState.argv.append(new PyString(ignoreFile));
        }

        String testPattern = System.getProperty(TEST_PATTERN_SYSTEM_PROPERTY);
        if(testPattern != null)
        {
            systemState.argv.append(new PyString(testPattern));
        }

        if(Boolean.getBoolean(ALWAYS_COLORIZE_SYSTEM_PROPERTY))
        {
            systemState.argv.append(new PyString("--always-colorize"));
        }

        PythonInterpreter interp = new PythonInterpreter(null, systemState);
        return interp;
    }
View Full Code Here

Examples of org.python.core.PyString

   * the referenced python module into Java bytecode
   */

  public InterpreterType create(String scripts) {

    PyObject buildingObject = interpreterClass.__call__(new PyString(
        scripts));
    InterpreterType ele = (InterpreterType) buildingObject
        .__tojava__(InterpreterType.class);
    return ele;
  }
View Full Code Here

Examples of org.python.core.PyString

        PySystemState systemState = new PySystemState();
        String testPattern = System.getProperty(TEST_PATTERN_SYSTEM_PROPERTY);

        if (xmlReportFile != null)
        {
            systemState.argv.append(new PyString("--xml"));
            systemState.argv.append(new PyString(xmlReportFile));
        }

        if(testPattern != null)
        {
            systemState.argv.append(new PyString(testPattern));
        }

        PythonInterpreter interp = new PythonInterpreter(null, systemState);
        return interp;
    }
View Full Code Here

Examples of org.python.core.PyString

                  }
                  if( argv != null ) {
                    PySystemState  state = Py.getSystemState();
                    state.argv.clear();
                    for (String str : argv ) {
                      state.argv.append(new PyString(str));
                    }
                  } else {
                    LOG.warn(PigContext.PIG_CMD_ARGS_REMAINDERS
                      + " is empty. This is not expected unless on testing." );
                  }
View Full Code Here

Examples of org.python.core.PyString

        }

        // Scalars are marshalled to PyString.
        if(model instanceof TemplateScalarModel)
        {
            return new PyString(((TemplateScalarModel)model).getAsString());
        }
       
        // Numbers are wrapped to Python built-in numeric types.
        if(model instanceof TemplateNumberModel)
        {
View Full Code Here

Examples of org.python.core.PyString

        }
    }

    @Override
    public void mapLine(String inputLine, LineMappingContext context) {
        mapperCallable.__call__(new PyString(inputLine), Py.java2py(context));
    }
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.