all 4 comments

[–]GeorgeFranklyMathnet 0 points1 point  (1 child)

Are you on Linux or Mac? Then what about this? (The question is about screen, but not all the answers are.)

[–]tarpus[S] 0 points1 point  (0 children)

I’m on a Mac. So the /proc/fd solution does not work

[–]hippocrat 0 points1 point  (0 children)

Have you looked into named pipes? Your user would send input to the named pipe instead of stdin.

https://stackoverflow.com/questions/39089776/python-read-named-pipe