Closed erhalv closed 2 years ago
Not sure I'm understanding the problem? Maybe a screenshot would help?
The issue seems to be that I'm not able to write to the pty process if it hasn't sent any data. This is the changes i made to the electron example:
ptyProcess.write
works when test.py contains:
input("test")
or
print("test")
input()
but does not work if test.py contains
input("")
Cannot repro this under linux. Is this a windows only issue by any chance?
@jerch it's Windows, I see python.exe
It's possible this is the same issue @Eugeny encountered in #457 and fixed in #460 , if using node
version 14+
Environment details
Issue description
I'm not able to send data to the process that only listens for input (does not send data). Spawning a python file with this code creates the issue:
input("")
With a python file like this it works:input("Hello")
I'm spawning the python file like this:
const ptyProcess = pty.spawn(path.join(process.cwd(), "./python/python.exe"),["./test.py"]
The same issue occur when spawning a similar program written in C#.I'm using the electron example provided in this repository (if you want to replicate this issue).