Skip to content

xopen should support filehandles #149

Closed
@rhpvorderman

Description

@rhpvorderman

This is what gzip.open does for instance: https://github.com/python/cpython/blob/d7334e2c2012defaf7aae920d6a56689464509d1/Lib/gzip.py#L60

I also made sure the threaded libraries do this: https://github.com/pycompression/python-isal/blob/970c141a4976276c8254310474db1038d63000ce/src/isal/igzip_threaded.py#L78

PipedCompressionProgram can also do this for writing files. For reading files, it is not possible however.

In any case, for most of the backends, processing a filehandle rather than a file is possible. This will make it easier to chain xopen to other open methods. See: marcelm/cutadapt#761

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