
public class JythonScriptExecutorUtils extends Object
| Constructor and Description |
|---|
JythonScriptExecutorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
executeInteractive()
Enter interactive jython accepting commands from stdin.
|
static void |
executeScript(InputStream is,
OutputStream out,
String... args)
Execute in memory the provided script.
|
static void |
executeScript(InputStream is,
String... args)
Execute in memory the provided script.
|
static void |
executeScript(InputStream is,
String fileName,
OutputStream out,
String... args)
Execute the provided script
|
static void |
executeScript(String scriptPath,
OutputStream out,
String... args)
Execute in memory the provided script.
|
static void |
executeScript(String scriptPath,
String... args)
Execute in memory the provided script.
|
static String |
getArgumentSettingCode(String fileName,
String... args)
Get Jython exec line to import command line arguments.
|
static InputStream |
getScriptInputStream(String script)
Get the InputStream for the provided script path.
|
static Properties |
loadPythonProperties() |
static void |
main(String[] args) |
public static InputStream getScriptInputStream(String script) throws FileNotFoundException
script - FileNotFoundExceptionpublic static void executeScript(String scriptPath, String... args) throws FileNotFoundException
scriptPath - the path of the script to execute.args - The command line arguments to be passed to the script.FileNotFoundExceptionpublic static void executeScript(String scriptPath, OutputStream out, String... args) throws FileNotFoundException, IOException
scriptPath - the path of the script to execute.out - The output stream for the script output.args - The command line arguments to be passed to the script.FileNotFoundExceptionIOExceptionpublic static void executeScript(InputStream is, String... args)
is - The Script's InputStream.args - The command line arguments to be passed to the script.public static void executeInteractive()
public static void executeScript(InputStream is, OutputStream out, String... args)
is - The Script's InputStream.out - The output stream for the script output.args - The command line arguments to be passed to the script.public static void executeScript(InputStream is, String fileName, OutputStream out, String... args)
is - The input stream from which to read the scriptfileName - The name of the script (for error messages)out - The output stream to useargs - The command line arguments to be passed to the script.public static Properties loadPythonProperties()
public static String getArgumentSettingCode(String fileName, String... args)
fileName - The fileName (or null if unknown)args - The command line argumentsCopyright © 2020 LSST. All rights reserved.