application: Initial port to Python
window: Initial port to Python