MCPcopy Index your code
hub / github.com/python/cpython / open_file

Function open_file

Lib/test/test_modulefinder.py:302–309  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

300""".encode('utf-8')]
301
302def open_file(path):
303 dirname = os.path.dirname(path)
304 try:
305 os.makedirs(dirname)
306 except OSError as e:
307 if e.errno != errno.EEXIST:
308 raise
309 return open(path, 'wb')
310
311
312def create_package(test_dir, source):

Callers 2

create_packageFunction · 0.85
test_bytecodeMethod · 0.85

Calls 2

openFunction · 0.50
dirnameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…