Python F Strings

Python F Strings

As of Python 3.6 per PEP 498 a new way of string formatting was introduced called F strings. While Python already had multiple multiple ways of string formatting, f strings aimed to provide a way to add embedded expressions directly within a string while using minimal formatting to give the best readability. In this post … Read more

Python – Run Code in Thread

When writing a script or program it is often required to do more than one thing at the same time for efficiency or to not cause the program to lock up while completing a long task. In python you have 2 main ways to accomplish this, the multiprocessing library and the threading library the threading … Read more

Python – List Comprehensions

In Python you can use list comprehensions to shorten the amount of code that you need to use to accomplish tasks when working with lists. The first time I heard of list comprehensions it sounded very advanced and confusing and when I looked at some example code I was, as I expected confused. Fear not … Read more

Python Tkinter Password Entry Box

In this post I am showing how to create an authentication box in Tkinter that has some basic functionality you would expect out of an authentication box. I just wanted this to be a simplistic design that was able to gather a users password and call another function, passing the username and password variable to … Read more

Tkinter Grid – Set Default Grid Size

When placing widgets (text boxes, buttons, etc.) in your user interface using Grid there will not be any whitespace between your widgets that are seperated by empty columns or rows by default unless you explicitly give weight to the empty rows or columns between your widgets. The empty cells in the grid do exist but … Read more