MCPcopy Index your code
hub / github.com/extrabacon/python-shell / send

Method send

index.ts:393–399  ·  view source on GitHub ↗

* Sends a message to the Python shell through stdin * Override this method to format data to be sent to the Python process * @returns {PythonShell} The same instance for chaining calls

(message: string | Object)

Source from the content-addressed store, hash-verified

391 * @returns {PythonShell} The same instance for chaining calls
392 */
393 send(message: string | Object) {
394 if (!this.stdin) throw new Error("stdin not open for writing");
395 let data = this.formatter ? this.formatter(message) : message;
396 if (this.mode !== 'binary') data += newline;
397 this.stdin.write(data);
398 return this;
399 };
400
401 /**
402 * Closes the stdin stream. Unless python is listening for stdin in a loop

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected