Organiser of the Edinburgh Language Exchange and The Edinburgh Open Tech Scene |
Full Snack Developer 🥪, Ramen guzzler 🍜, quiche murderer 🥧. A friendly cat.
Indeed but if the goal is to "just run" that one command it becomes something like
sh() | "docker-compose down" | go()
Which works, but is a bit meh... and like I said, getting < was low priority given that you could in fact just use an actual file handle.
One thing that is annoying is that Popen() expects a proper file descriptor in stidn - passing in a io.StringIO object fails with MethodNotFoundError on fileno()
I've overloaded OR here, I've overloaded __gt__ and XOR__ge__ to write respectively the process's stdout and stderr to the console, or even a file, it might be time for me to stop... ;-)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Lovely!
Maybe the pipeline processes could be constructed by the or-chain, and 'ignited' by a sentinel.
sh() | "ls" | "sort" | go()
Indeed but if the goal is to "just run" that one command it becomes something like
sh() | "docker-compose down" | go()
Which works, but is a bit meh... and like I said, getting
<
was low priority given that you could in fact just use an actual file handle.One thing that is annoying is that
Popen()
expects a proper file descriptor instidn
- passing in aio.StringIO
object fails withMethodNotFoundError
onfileno()
I've overloaded OR here, I've overloaded
__gt__
andXOR__ge__
to write respectively the process's stdout and stderr to the console, or even a file, it might be time for me to stop... ;-)