mainwindow py port