|
From: <bc...@wo...> - 2001-01-12 14:42:14
|
[Finn]
> (Perhaps we should consider adding a PythonInterpreter.initialize(..)
> method that just calls one of the PySystemState.initialize
> methods. That
> way the initialization methods becomes more visible.)
[Arno Schmidmeier]
>I would suggest to add an additional constructor.
>PythonInterpreter(Properties,Properties,String [])
That might give the impression that you can create a new
PythonInterpreter which will use the new values. These values can only
be specified once, so I think it is better with a static method on
PythonInterpreter like this:
/**
* Initialize the jython runtime. This method should only be
* called once, and should be call before any other python objects
* are created (including the creation of a PythonInterpreter).
*
* @param preProperties A set of properties. Typically
* System.getProperties() is used.
* @param postProperties An other set of properties. Values like
* python.home, python.path and all other
* values from the registry files can be
* added to this property set. PostProperties
* will override system properties and
* registry properties.
* @param argv Command line argument. These values will
* assigned to sys.argv.
*/
public static void initialize(Properties preProperties,
Properties postProperties,
String[] argv) {
PySystemState.initialize(preProperties, postProperties, argv);
}
regards,
finn
|