mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-17 07:03:00 +00:00
9 lines
No EOL
237 B
Python
9 lines
No EOL
237 B
Python
import io
|
|
|
|
from .handle_open import handle_open
|
|
|
|
def readfile(filepath, transparent_gzip=True):
|
|
handle = handle_open(filepath, "r") if transparent_gzip else io.open(filepath, "r")
|
|
content = handle.read()
|
|
handle.close()
|
|
return content |