Debreate.Maximize() elif conf_values[u'center']: from system.display import CenterOnPrimaryDisplay # NOTE: May be a few pixels off CenterOnPrimaryDisplay(Debreate) working_dir = conf_values[u'workingdir'] if parsed_path: project_file = parsed_path Logger.Debug(script_name, GT(u'Opening project from argument: {}').format(project_file)) if Debreate.OpenProject(project_file): working_dir = os.path.dirname(project_file) # Set working directory ChangeWorkingDirectory(working_dir) Debreate.Show(True) # Wait for window to be constructed (prevents being marked as dirty project after initialization) wx.Yield() # Set initializaton state to 'True' SetAppInitialized() debreate_app.MainLoop()