Metadata-Version: 2.1
Name: gopen
Version: 0.6.2
Summary: A generic context manager for readable files.
Home-page: https://github.com/simomarsili/gopen
Author: Simone Marsili
Author-email: simo.marsili@gmail.com
License: BSD 3-Clause
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Dist: six
Requires-Dist: python-magic
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

=====
gopen
=====
Provides the **gopen.readable()** and **gopen.gread()** functions.

**readable(source)** supports `with` statements for readable file objects::

  >>> with gopen.readable(source) as f:
  >>>     <read from f>

**gread(source)** returns an iterator over input lines::

  >>> from gopen import gread
  >>> lines = gread(source)
  >>> lines
  <generator object gread at 0x7f45752ebf10>

**<source>** can be:

* a readable file object,
* a file descriptor and
* a file pathname.

gzip and bzip2-compressed files will be decompressed on the fly.
No side effects: if `source` is a file descriptor or a file handle,
it will not be closed.

Changes
=======
0.6 (2019-05-27)
----------------
- Python3 only (>= 3.4)


