Web-gui for Python logs

Logging can help you better understand the flow of a program and discover undesirable behaviour which you might not even consider while developing. Logs give you information about scenarios that an application is going through. You can label this information according to its importance: debug, info, warning and errors. Occurring errors can provide more insights than a stack trace by telling you what the program state was before it arrived at the line of code where the error occurred.

Logs browser in Flask
Logs browser in Flask

Continue reading “Web-gui for Python logs”

Migration from Tkinter to Flask

The most popular library to create GUI in Python is Tkinter, which is a part of standard Python installation. Tkinter is a mature and stable tool, widely ported and relatively easy to learn. However, it is also quite old with many drawbacks, among them, it has a limited set of widgets. Although the simplistic model is easy to learn, Tkinter also becomes cumbersome with more complex interfaces. Above all, it does not support mobile and web application development.

Tkinter window
Tkinter window

Flask GUI
Flask GUI

Continue reading “Migration from Tkinter to Flask”

GUI as a state machine

When interacting with GUI, a user should be able to supply only valid events at any given time. Thus if an application requires a user to perform event A before event B, the interface should ensure that event B is not possible until event A has been completed. It can be achieved by making certain GUI elements disappear or become disabled.

GUI states
GUI states

Continue reading “GUI as a state machine”