Package com.alibaba.graphscope.utils
Class PythonInterpreter
- java.lang.Object
-
- com.alibaba.graphscope.utils.PythonInterpreter
-
public class PythonInterpreter extends Object
A python interpreter wrapped with java subprocess. We use this to executor graphscope python code.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PythonInterpreter.InterpreterErrorStream
static class
PythonInterpreter.InterpreterInputStream
static class
PythonInterpreter.InterpreterOutputStream
-
Constructor Summary
Constructors Constructor Description PythonInterpreter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
String
getMatched(String pattern)
String
getResult()
void
init()
void
runCommand(String str)
-
-
-
Method Detail
-
init
public void init() throws IOException
- Throws:
IOException
-
runCommand
public void runCommand(String str)
-
getResult
public String getResult() throws InterruptedException
- Throws:
InterruptedException
-
getMatched
public String getMatched(String pattern) throws InterruptedException
- Throws:
InterruptedException
-
close
public void close() throws InterruptedException
- Throws:
InterruptedException
-
-