MCPcopy Create free account
hub / github.com/SamuraiT/mecab-python3 / read_file

Function read_file

setup.py:18–24  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

16# Read a file within the source tree that may or may not exist, and
17# decode its contents as UTF-8, regardless of external locale settings.
18def read_file(filename):
19 filepath = os.path.join(SRCDIR, filename)
20 try:
21 raw = open(filepath, "rb").read()
22 except (IOError, OSError):
23 return ""
24 return raw.decode("utf-8")
25
26
27# Discard unwanted top matter from README.md for reuse as the long

Callers 1

read_and_trim_readmeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected