The wxPython GUI toolkit includes its own date / time capabilities. Most of the time, you can just use Python's datetime and time modules and you'll be fine. But occasionally you'll find yourself needing to convert from wxPython's wx.DateTime objects to Python's datetime objects. You may encounter this when you use the wx.DatePickerCtrl widget. Fortunately, […]
The other day, I saw an interesting question on StackOverflow where the author asked if there was a way to serialize a Python dictionary into a human-readable format. The answer that was given was to use a package called jsonpickle, which will serialize complex Python objects to and from JSON. This article will give you […]
The other day, I came across an article about a fork of the pbs package called sh. These packages are wrappers for Python's subprocess module. Basically sh allows you to import and use shell commands directly from Python. This article will go over a few examples to show you how to use this fun little […]
The arrow project is an attempt to wrap Python's time and datetime modules into a single API. It also claims to plug gaps in functionality in those modules, such as time spans, ISO-8601 and humanization. You can kind of think of arrow as a drop-in replacement for Python's datetime and time modules, much like the […]
The Pony ORM project is another object relational mapper package for Python. They allow you to query a database using generators. They also have an online ER Diagram Editor that is supposed to help you create a model. When I first started using PonyORM, they were one of the only Python packages I've seen with […]
I thought it would be fun to try out a few different Python object relational mappers (ORMs) besides SQLAlchemy. I recently stumbled across a project known as peewee. For this article, we will take the examples from my SQLAlchemy tutorial and port it to peewee to see how it stands up. The peewee project supports […]