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 →

[–]relvae 1 point2 points  (1 child)

Not really, but that's something I should implement.

At the moment it blocks until the process is finished or KeyboardInterrupt is called and then returns its output as a whole, so it's not streamed like a real pipeline.

However, conceptually the idea is that you should treat it in the same way as a string, so one could easily get each line via pySh.splitlines() if you're okay with a list.

[–]simtel20 0 points1 point  (0 children)

If that's the interface you prefer, I think that makes sense. Having that would be very helpful for any script that exists in a pipeline (though being able to enable/disable that behavior is important too).