This repository was archived by the owner on Apr 24, 2018. It is now read-only.
This repository was archived by the owner on Apr 24, 2018. It is now read-only.
Idea: piping arbitrary data to stdin #4
Open
Description
Sometimes you want to use some data in your program as input to some shell tool. Currently, if your data is not file-like object, you must jump through some hoops to make it work (StringIO object does not have fd, so it cannot be used). Personally, in such situation I would use tempfile module from standard library, but some transparent use of strings would be nice, I think.
Kinda like this:
pipes.run('cat /dev/stdin', stdin='something completely different')
or not so magical:
pipes.run('cat /dev/stdin', stdin=pipewrap('something completely different'))
Metadata
Metadata
Assignees
Labels
No labels