MCPcopy Create free account
hub / github.com/defold/defold / write_config

Function write_config

scripts/cmake/testserver.py:20–27  ·  view source on GitHub ↗
(path: str, ip: str, port: int)

Source from the content-addressed store, hash-verified

18
19
20def write_config(path: str, ip: str, port: int) -> None:
21 cfg = configparser.RawConfigParser()
22 cfg.add_section('server')
23 cfg.set('server', 'ip', ip)
24 cfg.set('server', 'socket', str(port))
25 with open(path, 'w') as f:
26 cfg.write(f)
27 print('Wrote test config file:', path)
28
29
30def main() -> int:

Callers 1

mainFunction · 0.85

Calls 3

printFunction · 0.50
setMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected