• Python,  Tkinter

    import Tkinter does not work in Python 3

    I am busy working through an older book called Tkinter GUI Application Development HOTSHOT by Bhashkar Chaudhary but the book is written for Python 2.7 I am using Python 3.10 and some of the statements in the book does not work for Python 3 so I will be posting the changes from time to time. The first issue I stumbled on is the import statement to import Tkinter. From the book you need to import it as:import Tkinter and this does not work in Python 3. in Python 3 use import tkinter (without the capital T) The test in IDLE as per the book will also fail for Python 3.The…

  • Python

    Convert a PyQt ui file to a Python file on Linux

    Part of my Python programming module at Unisa is based on creating GUI applications using the Qt framework, PyQt5 to be more precise. Unfortunately the study guide is based on Windows and not everything works the same way on Linux. The problem I had was not converting the .ui file as saved from Qt Designer to the .py file but with opening and running the application. The first conversion I did was straight from the guide as per below: