python

Programming languages are how programmers express and communicate ideas

“In reality, programming languages are how programmers express and communicate ideas — and the audience for those ideas is other programmers, not computers. The reason: the computer can take care of itself, but programmers are always working with other programmers, and poorly communicated ideas can cause expensive flops.”

~ Guido van Rossum, in this 2016 article

How to get the IP address of a Linux system from the command line

One way to to get the IP address of a Linux system from the Linux command line is this:

$ hostname -I

That’s the hostname command, followed by a capital letter i as a command line parameter. On my Raspberry Pi system, this command returns its IP address — and only its IP address — like this:

10.0.1.9

It’s nice that this command returns only the IP address, because that means I don’t have to pipe together several commands to get what I need.

A Python script to read RSS feeds (and much more)

With the caveats that (a) I don’t know much about Python, (b) I don’t want to learn that much about it right now, and (c) I’m not concerned with performance at the moment, the following Python script does the following:

A Python screensaver for xscreensaver (Linux)

I know remarkably little about Python and GTK, but from the two URLs shown in the source code below I was able to piece together a working, “Hello, world” screensaver. Well, calling it a screensaver is a stretch, because what it will really do is burn the characters “Hello, world” into your monitor; but at least I cracked the code on how to get this started.

To try this on your own Linux system running xscreensaver, first save the following source code somewhere. I’ll assume that you’ve saved it to /home/al/hello.py:

A simple Python feedparser script

As a quick example today, the following source code is for a Python feedparser script I wrote, based on the URL shown:

Cato - A database CRUD assistant

I'm getting closer to releasing my "programming language independent" CRUD generator application. I'm now calling it Cato. My previous code names for it were Db2App and SideKick, but when I thought about the name SideKick, I couldn't help but think about Inspector Clousseau's trusty sidekick Cato Fong, and thus the application name was born. :)