Package edu.tufts.hrilab.python
Class PythonWrapper
java.lang.Object
edu.tufts.hrilab.python.PythonWrapper
-
Constructor Summary
ConstructorsConstructorDescriptionPythonWrapper(String file) PythonWrapper(String file, boolean spoke) If running python module as a TRADE spoke (i.e., spoke == true), this constructor uses the default 127.0.0.1@10002 hub address and port.PythonWrapper(String file, boolean spoke, String hubContainer) If running python module as a TRADE spoke (i.e., spoke == true), this constructor requires setting the TRADE hub address and port. -
Method Summary
-
Constructor Details
-
PythonWrapper
-
PythonWrapper
If running python module as a TRADE spoke (i.e., spoke == true), this constructor uses the default 127.0.0.1@10002 hub address and port.- Parameters:
file- python module to startspoke- if true, connect to TRADE as a spoke (requires a TRADE hub to be running)
-
PythonWrapper
If running python module as a TRADE spoke (i.e., spoke == true), this constructor requires setting the TRADE hub address and port.- Parameters:
file- python module to startspoke- if true, connect to TRADE as a spoke (requires a TRADE hub to be running)hubContainer- TRADE hub to connect to of the form ip_adress@port (e.g., 127.0.0.1@10002)
-
-
Method Details
-
start
Starts the python process. Some important side effects: - Passes in the "--classpath" arg to python. As a result, Python modules that use argparse will need to use parse_known_args - Starts a shutdown hook to end the python process when the JVM is shut down
-