[py3] Add --inspect argument to chirpwx for wxPython debugging

#495
This commit is contained in:
Dan Smith 2020-02-11 20:19:37 -08:00
parent dffe8b0106
commit c6533f47fe

View File

@ -34,6 +34,8 @@ if __name__ == '__main__':
help="Enable profiling")
parser.add_argument("--onlydriver", nargs="+",
help="Include this driver while loading")
parser.add_argument("--inspect", action="store_true",
help="Show wxPython inspector")
logger.add_arguments(parser)
args = parser.parse_args()
@ -48,4 +50,8 @@ if __name__ == '__main__':
for fn in args.files:
mainwindow.open_file(fn, select=False)
if args.inspect:
import wx.lib.inspection
wx.lib.inspection.InspectionTool().Show()
app.MainLoop()