- Jython 2.7b1+ (default:a984d658882a, Oct 1 2013, 12:02:56)
- [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_21
- Type "help", "copyright", "credits" or "license" for more information.
- >>> from org.python.util import PythonInterpreter
- >>> from java.lang import System
- >>> PythonInterpreter.initialize(System.getProperties(), System.getProperties(), ["one", "two"])
- >>> pi = PythonInterpreter()
- >>> pi.exec("import sys; print(sys.argv)")
- ['']
- >>> import sys
- >>> sys.argv = ["setting the host vm argv"]
- >>> pi.exec("import sys; print(sys.argv)")
- ['setting the host vm argv']