(path: str, ip: str, port: int)
| 18 | |
| 19 | |
| 20 | def 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 | |
| 30 | def main() -> int: |