Now we have a spreadsheet I need to be able to show the results on the screen. Still using wxPython, going to make use of the list control. It doesn’t look great on Windows, but it’s functional and seems to have a lot of flexibility. Create a ListCtrl Add the list to the sizer This The full story here…
Category: Desktop Apps
Photo App – Add a Module
As I start adding more code, I want to separate different functionality into different python files. In Python, you call these separate files modules. I need to learn how to use modules in Python.
wxPython User Interface
I’m not ecstatic about the 90 degree corners. The whole UI is a little bit dated. But life is too short. The background image needs tweaking, but I don’t have any colour tools on this computer so we’ll live with it for now.
wxPython Background Image Scaling
What is a user interface without a background image? Not only does it need an image, it also needs to automatically resize to fit, as the user resizes the user interface. The photo used here is my original photo. It is only for exercising the code. I don’t have any intention of using this exact The full story here…
Photo Consolidation Project – Python Classes
The first attempt at wxPython was a good experience. However I don’t like putting a pile of code in a class’s init method, and the examples show drawing up the whole UI in the init. When I tried to refactor I came unstuck. Time to learn a little bit of Python theory.
Photo Consolidation Project – User Interface Libraries
We need a user interface where the user can enter the root folder that needs to be searched for photos. In time we can add features to it. But for now it needs to allow you to choose a folder, and have a button to launch the process.
Photo Consolidation Project – csv Prototype
Now it comes time to put what we have learnt into a single Python script. We will need to paste the root file path into the code, and call out the name and location of the result csv path. In the final version these two pieces of data will change. The root folder will be The full story here…
Photo Consolidation Project – Write to File
In order to get working software sooner, I’ve decided to write the data to a csv file. This will allow us to get cracking on the photos without having to wait for the completed project. And for some people, a csv file will be enough. The database will just be extra complexity. But there is The full story here…
Photo Consolidation Project – Traverse Files
We need to walk through a file tree, going down into each subfolder. For now I am just logging the file path to the terminal. The source folder is hard coded, and it is in Windows format. But it should automatically work for other operating systems.
Photo Consolidation Project – Get a Hash
I decided to get the md5 hash of a file. This is pretty much unique. It ignores dates or file sizes which may vary depending on different systems. But it will identify a file as different if it has been resized. There may be a reason to keep different sizes of files – if you The full story here…