Sometimes I need to use some binary data (e.g. a bitmap image) in a Python script. In a package, you can store this data portable in a data subdirectory of a modules using the package_data argument of setuptools.setup. This won’t work in a standalone script. You can of course make your script into a package, but here I want to show an alternative solution.
This is my home in the virtual world, where I write about things that I want to share. The freely available software that I've written as well as some of the photographs I've taken over the years can also be found here. Please use the navigation links on the right if you are looking for something.
The compression speed and ratio of several compression programs is tested.
For years I’ve been using fetchmail and procmail for incoming mail. However, both of these programs haven’t been maintained for years. So it was time to change.
My balcony gets the evening sun. Sometimes the sun and clouds make for a stunning view. See below.
As an exercise, I wrote a small script to read the Atom feeds for some favourite youtube channels. Of course I could have installed a “real” feed-reader, but that would be overkill and not half as much fun. :-)
The question now is if we can reduce that? For that we’re going to use mmap to look at the mailbox, and call sysctlbyname(3) using ctypes to get the remaining system information. Note that sysctl et al and the names used are specific to FreeBSD.
When updating my ports, I prefer to use packages when I have not changed the options of a port. This describes how I do that.
In an earlier article I talked about using a picture environment in LaTeX to add lines and text over an image. In another article I showed how to draw with PostScript, including using Encapsulated PostScript to include arbitrary images.
In this article I want to cover the pros and cons of these methods and introduce a third method: TikZ.