#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys def write_file(path, content): os.makedirs(os.path.dirname(path), exist_ok=True) with open(path, 'w', encoding='utf-8') as f: f.write(content.strip() + '\n') print(f'Wrote {path}: {len(content)} chars')