MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / read_file

Function read_file

tensorlayer/files/utils.py:2313–2322  ·  view source on GitHub ↗

Read a file and return a string. Examples --------- >>> data = tl.files.read_file('data.txt')

(filepath)

Source from the content-addressed store, hash-verified

2311
2312
2313def read_file(filepath):
2314 """Read a file and return a string.
2315
2316 Examples
2317 ---------
2318 >>> data = tl.files.read_file('data.txt')
2319
2320 """
2321 with open(filepath, 'r') as afile:
2322 return afile.read()
2323
2324
2325def load_file_list(path=None, regx='\.jpg', printable=True, keep_prefix=False):

Callers 4

load_flickr25k_datasetFunction · 0.90
load_flickr1M_datasetFunction · 0.90
load_flickr25k_datasetFunction · 0.85
load_flickr1M_datasetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…