this post was submitted on 09 Dec 2023
145 points (87.2% liked)

Programmer Humor

32000 readers
936 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 11 points 9 months ago (1 children)

A PTS is a single character device. Writing to it causes output to appear on the terminal buffer, reading from it reads from the input buffer. So, writing to it like you do from a separate shell effectively does the same as calling print() from python which has it as inherited stdio. There is a way to write to a PTS input buffer but it's not straightforward and works in a completely different way. Use something like tmux instead, or better, sockets.

[โ€“] [email protected] 4 points 9 months ago

thank you!

tmux did thr tick for me