Detect Linux Runlevel

Michael Torrie torriem at
Tue Dec 6 11:45:05 EST 2016

On 12/06/2016 09:18 AM, Wildman via Python-list wrote:
> It is sad that you consider learning something new to
> be worthless.  I used the term "worthlessware" in an
> economical sense, meaning it has little or no commercial
> value.  However, from a learning standpoint I consider
> it to be priceless.

Well said. Some of us get hung up so much on the proper way to do
something that we end up not doing much at all, other than talk about
the proper way to do things.  I tend to have this problem.  While I
talked about the proper and theoretical ways of doing agricultural GPS
coverage mapping, another person with less formal programming training
than I started hacking and you know what? He has a functioning program
now that actually works. It's in C# (which I don't love), and it's got
rough spots in the code and it's a bit difficult to add certain features
to, but he simply went and did and learned as he went.  Now he's at the
point where he could refactor (and do it quickly) to get the
architecture a bit more robust.  But the point is I wasted all my time
thinking about how I might do it and he just did it.  Was very
instructive to me.

>>> A friend wrote a similar program in Bash script and I have been
>>> working on translating it to Python.
>> Stay with shell script for such tasks. It is never a good idea to
>> choose the programming language before closer evaluating the problem.
> You have a right to your opinion but I fail to see what
> that has to do with the price of eggs.  I picked Python
> just because I wanted to learn it not because I had a
> particular problem to solve.  If your job was to advocate
> Python, I would suggest you find another line of work.

I appreciate your measured response to what could be seen as an
inflammatory post.

Sometimes I think it all depends on the purpose for which you do
something. In this case it's for fun, so knock yourself out. If you were
instead writing this as part of a requirement for some enterprise server
process professionally, you'd probably want to stick with Bash rather
than shoe-horn Python into a systems programming language and
shell-scripting language, which it's not really that good at.  I can say
this given my professional experience with server shell scripting.

More information about the Python-list mailing list