Package org.python.core

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


  /**
   * @return List of variable names known to the interpreter.
   */
  public List<String> getVariables() {
    PyStringMap map = (PyStringMap) myInterpreter.getLocals();
    PyList keys = (PyList) map.keys();
    PyObject iter = keys.__iter__();

    List<String> result = new ArrayList<String>(50);
    myDocumentation = new ArrayList<String>(50);
    for (PyObject item; (item = iter.__iternext__()) != null; ) {
View Full Code Here


  /**
   * Returns names of all variables in the local workspace.
   */
  public String[] getVariables() {
    PyStringMap dict = (PyStringMap)myInterpreter.getLocals();
    return (String[])dict.keys().toArray(new String[0]);
  }
 
  /**
   * Reset the script console back to initial conditions (remove all modules and variables
   * added within the interpreter).
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.