python-shell icon indicating copy to clipboard operation
python-shell copied to clipboard

How do I pass input to PythonShell.runString() ?

Open Saswat689 opened this issue 2 years ago • 0 comments

The Question: I am executing some python code coming from client on the server. I want to provide some stdin to the program code. How do I do that ?

Any relevant python/javascript code: This is how I am using it currently...

PythonShell.runString('some python code',null) .then(messages=>{ console.log(messages) //server stuff }) .catch(err => { console.log(err) // respond with err })

How can I pass input to the program ?

Saswat689 avatar Mar 20 '23 05:03 Saswat689