MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / setup

Function setup

example_code/item_078.py:219–231  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217 handle.close()
218
219def setup():
220 tmpdir = TemporaryDirectory()
221 input_paths = start_write_threads(tmpdir.name, 5)
222
223 handles = []
224 for path in input_paths:
225 handle = open(path, "rb")
226 handles.append(handle)
227
228 Thread(target=close_all, args=(handles,)).start()
229
230 output_path = os.path.join(tmpdir.name, "merged")
231 return tmpdir, input_paths, handles, output_path
232
233
234print("Example 10")

Callers 3

item_078.pyFile · 0.70
setup.pyFile · 0.50
setup.pyFile · 0.50

Calls 3

openFunction · 0.85
start_write_threadsFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected