© Mike Driscoll 2018
Mike DriscollwxPython Recipeshttps://doi.org/10.1007/978-1-4842-3237-8_19

19. Working with Your Application

Mike Driscoll
(1)
Ankeny, New York, USA
 

Recipe 19-1. How to Edit Your GUI Interactively Using reload( )

Problem

I came across an interesting question on StackOverflow a few years ago where the author was asking how he could write a wxPython program dynamically. In other words, he wanted to be able to edit the code and basically refresh the application without closing it and rerunning his code. The simplest way would be to use Python’s built-in reload() functionality . If we go this route, then we’ll need to build a little front end to import the code that we want to change interactively.

Solution

Figure 19-1
Reloading your ...

Get wxPython Recipes: A Problem - Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.