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 classPythonInterpreter.InterpreterErrorStreamstatic classPythonInterpreter.InterpreterInputStreamstatic classPythonInterpreter.InterpreterOutputStream
-
Constructor Summary
Constructors Constructor Description PythonInterpreter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()StringgetMatched(String pattern)StringgetResult()voidinit()voidrunCommand(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
-
-