- DahGangalang ( @DahGangalang@infosec.pub ) 31•11 months ago
So I love that this meme is detailed enough to have the older guy’s arm partially block his name tag.
…but I’m disappointed that, in spite of such details elsewhere, there’s a misspelt word.
The dichotomy is making my bones itch.
- oo1 ( @oo1@kbin.social ) 26•11 months ago
stackoverflow vs posting a meme.
Which one gets the best help?
I can see the appeal of the meme option.
Context:
I have 2 Terminals open, in one is a Python Terminal Chat client running(pt3). I want to sent text from the other terminal(pt2) to the chat. It does write the text to pt3 but pt3 dosent ‘see’ the text.
If i send over “hallo world” it prints on the terminal but dosent show up in chat.
- BeigeAgenda ( @BeigeAgenda@lemmy.ca ) 11•11 months ago
My first thought was, can you flush the buffer?
- Programmer Belch ( @programmer_belch@lemmy.dbzer0.com ) English10•11 months ago
Just guessing here but could it be because you haven’t set up correctly pt2 as stdin for pt3, try to invoke the command as
script.py
- 2xsaiko ( @2xsaiko@discuss.tchncs.de ) 8•11 months ago
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.
thank you!
tmux did thr tick for me
- navigatron ( @navigatron@beehaw.org ) 3•11 months ago
Time to dive into the wide world of VTTYs. I believe you’re writing to pts3’s output buffer - writing to its input buffer is a different virtual device / may be a process descriptor, I’m not sure. Look into the history of vttys and it should start to make sense.