Package edu.wpi.grip.core.operations
Class PythonScriptFile
- java.lang.Object
-
- edu.wpi.grip.core.operations.PythonScriptFile
-
public abstract class PythonScriptFile extends java.lang.Object
Converts a string of Python Code or a Python File into something thePythonScriptOperation
can handle.
-
-
Constructor Summary
Constructors Constructor Description PythonScriptFile()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static PythonScriptFile
create(java.lang.String code)
static PythonScriptFile
create(java.net.URL url)
abstract java.util.List<SocketHint<org.python.core.PyObject>>
inputSocketHints()
abstract java.lang.String
name()
abstract java.util.List<SocketHint<org.python.core.PyObject>>
outputSocketHints()
abstract org.python.core.PyFunction
performFunction()
abstract java.lang.String
summary()
OperationMetaData
toOperationMetaData(InputSocket.Factory isf, OutputSocket.Factory osf)
Converts this file into aPythonScriptOperation
.
-
-
-
Method Detail
-
create
public static PythonScriptFile create(java.net.URL url) throws java.io.IOException
- Parameters:
url
- The URL to get the script file from.- Returns:
- The constructed PythonScript file.
- Throws:
java.io.IOException
- If the URL fails to open.
-
create
public static PythonScriptFile create(java.lang.String code)
- Parameters:
code
- The code to create the file from.- Returns:
- The constructed PythonScript file.
-
name
public abstract java.lang.String name()
-
summary
public abstract java.lang.String summary()
-
inputSocketHints
public abstract java.util.List<SocketHint<org.python.core.PyObject>> inputSocketHints()
-
outputSocketHints
public abstract java.util.List<SocketHint<org.python.core.PyObject>> outputSocketHints()
-
performFunction
public abstract org.python.core.PyFunction performFunction()
-
toOperationMetaData
public final OperationMetaData toOperationMetaData(InputSocket.Factory isf, OutputSocket.Factory osf)
Converts this file into aPythonScriptOperation
.- Parameters:
isf
- Input Socket Factoryosf
- Output Socket Factory- Returns:
- The meta data for a
PythonScriptOperation
-
-