UNPKG

python-shell-cluster

Version:
19 lines (15 loc) 414 B
# Python Shell Cluster Utility to run python script in parallel from nodejs ## Example: ### Typescript ```Typescript import PythonShellCluster from "./index" const cluster = new PythonShellCluster(1, __dirname + "/python/main.py") cluster.run("this message will be passed to python").then((resposne) => console.log(resposne)) ``` ### Python ```Python while True: b = input() print("received" + b) ```