Java Doc for PythonInterpreter.java in  » Testing » Marathon » org » python » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » Marathon » org.python.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.python.util.PythonInterpreter

All known Subclasses:   org.python.util.InteractiveInterpreter,
PythonInterpreter
public class PythonInterpreter (Code)
The PythonInterpreter class is a standard wrapper for a JPython interpreter for use embedding in a Java application.
author:
   Jim Hugunin
version:
   1.0, 02/23/97


Field Summary
protected  CompilerFlagscflags
    
 PyObjectlocals
    
 PyModulemodule
    
protected  PySystemStatesystemState
    

Constructor Summary
public  PythonInterpreter()
    
public  PythonInterpreter(PyObject dict)
    
public  PythonInterpreter(PyObject dict, PySystemState systemState)
    

Method Summary
public  voidcleanup()
    
public  PyObjecteval(String s)
    
public  voidexec(String s)
    
public  voidexec(PyObject code)
    
public  voidexecfile(String s)
    
public  voidexecfile(java.io.InputStream s)
    
public  voidexecfile(java.io.InputStream s, String name)
    
public  PyObjectget(String name)
    
public  Objectget(String name, Class javaclass)
     Get the value of a variable in the local namespace Value will be returned as an instance of the given Java class.
public  PyObjectgetLocals()
    
public static  voidinitialize(Properties preProperties, Properties postProperties, String[] argv)
     Initializes the jython runtime.
public  voidset(String name, Object value)
    
public  voidset(String name, PyObject value)
    
public  voidsetErr(PyObject outStream)
    
public  voidsetErr(java.io.Writer outStream)
    
public  voidsetErr(java.io.OutputStream outStream)
    
public  voidsetLocals(PyObject d)
    
public  voidsetOut(PyObject outStream)
    
public  voidsetOut(java.io.Writer outStream)
    
public  voidsetOut(java.io.OutputStream outStream)
    
protected  voidsetState()
    

Field Detail
cflags
protected CompilerFlags cflags(Code)



locals
PyObject locals(Code)



module
PyModule module(Code)



systemState
protected PySystemState systemState(Code)




Constructor Detail
PythonInterpreter
public PythonInterpreter()(Code)
Create a new Interpreter with an empty dictionary



PythonInterpreter
public PythonInterpreter(PyObject dict)(Code)
Create a new interpreter with the given dictionary to use as its namespace
Parameters:
  dict - the dictionary to use



PythonInterpreter
public PythonInterpreter(PyObject dict, PySystemState systemState)(Code)




Method Detail
cleanup
public void cleanup()(Code)



eval
public PyObject eval(String s)(Code)
Evaluate a string as Python source and return the result
Parameters:
  s - the string to evaluate



exec
public void exec(String s)(Code)
Execute a string of Python source in the local namespace
Parameters:
  s - the string to execute



exec
public void exec(PyObject code)(Code)
Execute a Python code object in the local namespace
Parameters:
  code - the code object to execute



execfile
public void execfile(String s)(Code)
Execute a file of Python source in the local namespace
Parameters:
  s - the name of the file to execute



execfile
public void execfile(java.io.InputStream s)(Code)



execfile
public void execfile(java.io.InputStream s, String name)(Code)



get
public PyObject get(String name)(Code)
Get the value of a variable in the local namespace
Parameters:
  name - the name of the variable



get
public Object get(String name, Class javaclass)(Code)
Get the value of a variable in the local namespace Value will be returned as an instance of the given Java class. interp.get("foo", Object.class) will return the most appropriate generic Java object.
Parameters:
  name - the name of the variable
Parameters:
  javaclass - the class of object to return



getLocals
public PyObject getLocals()(Code)



initialize
public static void initialize(Properties preProperties, Properties postProperties, String[] argv)(Code)
Initializes the jython runtime. This should only be called once, and should be called before any other python objects are created (including a PythonInterpreter).
Parameters:
  preProperties - A set of properties. Typically System.getProperties() is used.
Parameters:
  postProperties - An other set of properties. Values like python.home,python.path and all other values from the registry files canbe added to this property set. PostProperties will overridesystem properties and registry properties.
Parameters:
  argv - Command line argument. These values will assigned to sys.argv.



set
public void set(String name, Object value)(Code)
Set a variable in the local namespace
Parameters:
  name - the name of the variable
Parameters:
  value - the value to set the variable to.Will be automatically converted to an appropriate Python object.



set
public void set(String name, PyObject value)(Code)
Set a variable in the local namespace
Parameters:
  name - the name of the variable
Parameters:
  value - the value to set the variable to



setErr
public void setErr(PyObject outStream)(Code)



setErr
public void setErr(java.io.Writer outStream)(Code)



setErr
public void setErr(java.io.OutputStream outStream)(Code)



setLocals
public void setLocals(PyObject d)(Code)



setOut
public void setOut(PyObject outStream)(Code)
Set the Python object to use for the standard output stream
Parameters:
  outStream - Python file-like object to use as output stream



setOut
public void setOut(java.io.Writer outStream)(Code)
Set a java.io.Writer to use for the standard output stream
Parameters:
  outStream - Writer to use as output stream



setOut
public void setOut(java.io.OutputStream outStream)(Code)
Set a java.io.OutputStream to use for the standard output stream
Parameters:
  outStream - OutputStream to use as output stream



setState
protected void setState()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.