MCPcopy Index your code
hub / github.com/nodejs/node / open_to_write

Function open_to_write

deps/inspector_protocol/convert_protocol_to_json.py:13–17  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

11import pdl
12
13def open_to_write(path):
14 if sys.version_info >= (3,0):
15 return open(path, 'w', encoding='utf-8')
16 else:
17 return open(path, 'wb')
18
19
20def main(argv):

Callers 1

mainFunction · 0.70

Calls 1

openFunction · 0.50

Tested by

no test coverage detected