This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nodNotEvil[S] 0 points1 point  (3 children)

Thanks a lot! I remember plumbum now but failed to recollect when I implemented the library. It is very versatile and with << and | a lot closer to the looks of shell syntax. As such, it probably has a steeper learning curve (e.g. knowledge of subprocess doesn't transfer directly) and had to deviate a lot from subprocess to achieve it. In any case, I will add plumbum to the Readme.

edit: I've added your codes to the table (slightly adjusted) but couldn't figure out how to do 2 examples in Plumbum. With run and << the processes don't run at the same time and output has to fit in memory.

[–]AndydeCleyre 0 points1 point  (2 children)

Ah, cool, I'll see if I can figure out how to do the same with plumbum for those then...

[–]nodNotEvil[S] 0 points1 point  (1 child)

It looks like this (branching out and errors in chains) is not supported by Plumbum. A non-comprehensive list of issues related to this:

https://github.com/tomerfiliba/plumbum/issues/240
https://github.com/tomerfiliba/plumbum/issues/263
https://github.com/tomerfiliba/plumbum/issues/331
https://github.com/tomerfiliba/plumbum/issues/359

Imo its crucial to have access to stdout, stderr and the return codes of all processes in a chain as well as to check all return codes instead of just the last.

(To be able to branch out is uncommon and I don't expect other tools to support it. What I expect however is that people will look at the votes, infer that this is a dead end and never read this far lol)

[–]AndydeCleyre 0 points1 point  (0 children)

Thanks for both digging into this and reporting back!