Allow to read from stdin
See original GitHub issueSo it is possible to use functions like scanf
.
Thanks to @ryukinix for letting me know about this enhancement.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Allow program to read from stdin or arguments in Swift
Allow program to read from stdin or arguments in Swift · Accepts either a single argument or piped data from standard input, and...
Read more >allow to read input from stdin · Issue #13 - GitHub
As per title. Weirdly enough, currently beancount2ledger accepts "-" as an argument, without failing, but it does nothing: $ beancount2ledger - ...
Read more >How does `less` take data from stdin while still be able to read ...
Yes, there is one input stream, and one tty. less reads data from stdin, and commands from the tty. – William Pursell. Jun...
Read more >Stdin in std::io - Rust
This handle implements the Read trait, but beware that concurrent reads of Stdin must be executed with care. Created by the io::stdin method....
Read more >How to Read from stdin in Python - DigitalOcean
Python sys module stdin is used by the interpreter for standard input. Internally, it calls the input() function. The input string is appended ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m trying to implement this, but I’m a little stuck: My idea is to override all
fgets
calls withmy_fgets
using a macro. Thismy_fgets
inmaster.c
notifies its parent (subprocess.Popen inkernel.py
) somehow to send aninput_request
throughstdin_socket
. Wheninput_reply
is received from the frontend the data is piped to the stdin of subprocess.I managed to request and receive input from the frontend as such, which works just fine:
Questions
I cannot find or decide on a mechanism to notify from
master.c
to Pythonsubprocess
instance that input is requested:zmq
sockets directly from master.c?SIGTTIN
andSIGTTOU
(good blog), but they appear to be used from parent-to-child and I want from child to parent.Ah, ok. I misunderstood the first post in this thread. Thanks for clearing that up. Any idea when an input function might be incorporated?