filehandles is a file handle manager that let you get file handles from different sources.
The filehandles package is a Python library that facilitates processing of files by removing boilerplate code that you need to write to open files from directories, zip archives, tar archives, URL addresses of files, etc. It also automatically closes open file handle after it has been processed.
The filehandles package runs under Python 2.7 and Python 3.4+. Use pip to install.
python3 -m pip install filehandles
python3 -m pip install filehandles --upgrade
>>> from filehandles import filehandles >>> >>> for fh in filehandles('path/to/files'): ... # utilize file handle ... text = fh.readline() >>>
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size filehandles-0.1.0.tar.gz (5.4 kB)||File type Source||Python version None||Upload date||Hashes View|
|Filename, size filehandles-0.1.0-py3.5.egg (8.7 kB)||File type Egg||Python version 3.5||Upload date||Hashes View|
|Filename, size filehandles-0.1.0-py2.7.egg (8.6 kB)||File type Egg||Python version 2.7||Upload date||Hashes View|