mirror of
https://github.com/NaN-tic/trytond-systemlogics_modula.git
synced 2023-12-14 04:32:53 +01:00
14 lines
376 B
Python
14 lines
376 B
Python
# The COPYRIGHT file at the top level of this repository contains the full
|
|
# copyright notices and license terms.
|
|
|
|
__all__ = ['read_file']
|
|
|
|
|
|
def read_file(filename):
|
|
with open(filename) as f:
|
|
data = f.read()
|
|
# On python3 we must cast to bytes with valid encoding
|
|
if bytes != str:
|
|
data = bytes(data, encoding=f.encoding)
|
|
return data
|