wxPython: Creating a Grid with XRC

I recently tried to help someone (on the wxPython mailing list) figure out how to use a Grid widget (wx.grid.Grid) via XRC. It should be simple, but if you run the code below, you’ll discover a weird issue: import wx from wx import xrc ######################################################################## class MyApp(wx.App): def OnInit(self): self.res = xrc.XmlResource(“grid.xrc”) frame = self.res.LoadFrame(None, […]

wxPython: Creating a Grid with XRC Read More »

Bottle – Adding SQLAlchemy to the Todo List Web App

In this article we will be taking the code from the previous article on Bottle and changing it such that it uses SQLAlchemy instead of just normal SQLite code. This will require you to download the bottle-sqlalchemy package from PyPI. You can also install it using “pip install bottle-sqlalchemy”, assuming you have pip installed. You

Bottle – Adding SQLAlchemy to the Todo List Web App Read More »

Bottle – Creating a Python Todo List Web App

Python has lots of web frameworks. Bottle is one of them and is considered a WSGI Framework. It’s also sometimes called a “micro-framework”, probably because Bottle consists of just one Python file and has no dependencies besides Python itself. I’ve been trying to learn it and I was using the official Todo-list tutorial on their

Bottle – Creating a Python Todo List Web App Read More »

Using Python to Teach About Finding the Digital Root

My wife teaches 3rd grade math and she recently learned about the process of obtaining the digital root of numbers. The digital root is a single digit number found by summing the individual digits. So for 15, you would add 1+5 to get 6. Thus 6 is the digital root of 15. The trainer that

Using Python to Teach About Finding the Digital Root Read More »

wxPython: Updating Your Application with Esky

Today we’re going to learn about one of wxPython’s newer features: wx.lib.softwareupdate. It was actually added a couple of years ago. What this allows you to do is add update abilities to your software. As far as I can tell, this mixin only allows prompted updates, not silent updates. Getting Started It’s built into wxPython

wxPython: Updating Your Application with Esky Read More »

wxPython: How to Communicate with Your GUI via sockets

I sometimes run into situations where it would be nice to have one of my Python scripts communicate with another of my Python scripts. For example, I might want to send a message from a command-line script that runs in the background to my wxPython GUI that’s running on the same machine. I had heard

wxPython: How to Communicate with Your GUI via sockets Read More »