Roland's homepage

My random knot in the Web

Older articles (2/19)

  1. Including binary data in Python scripts

    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.

  2. My e-mail setup

    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.

  3. Luminous clouds

    My balcony gets the evening sun. Sometimes the sun and clouds make for a stunning view. See below.

  4. A simple feed reader for Youtube

    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. :-)

  5. Attempting a conky replacement in Python (part 2)

    In part 1 we say that a simple replacement for conky for generating a statusline for i3 can be achieved. But since it uses the subprocess module to call external programs it is pretty CPU intensive.

    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.


←  Page 1 Page 2 / 19 Page 3 →