Skip to content
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
@jamert

Description

@jamert

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions