Expose getMainWindow() to Python