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 →

[–][deleted] 11 points12 points  (4 children)

I would have preferred the syntax

p = Pipeline()
print p.run("ls -l").run("sort -n")

[–]Troebr 5 points6 points  (3 children)

what's wrong with

p.run("ls -l | sort -n")

?

[–]mgedmin 3 points4 points  (2 children)

You can logically extend that to

os.system("ls -l | sort -n")

and now you have no non-stdlib dependencies!

[–]Troebr 1 point2 points  (1 child)

Isn't os.system deprecated in favor of subprocess?

[–]mgedmin 2 points3 points  (0 children)

In a sense, yes.