A bit of Python and some nice arguments

I really don't  use scripting languages on a regular basis but I do like to use the right tool for a job.  Or at least recognize that technologies with which we are most familiar are not always the best choice for any given use.  Python is not a difficult language.  I have heard for years that it's the new Perl which I find funny because of those I know using Perl, I have yet to learn of one contemplating a switch to Python.

Depending on what you read, Google seems to like Python.  At least enough to create some course material and a whole lot of examples for their various efforts.

It's been a good while since I looked at Python but it only took a short time today to write a simple script to call a REST service (as well it should).  Finding a nice little library, I chose argparse, for the command line parameter processing ultimately required the most time (probably an hour after spending a lot less on the actual need).  This was because I wrote the script on a Mac which happens to have version 2.7.2 of Python.  Ultimately I need for this script to run on CentOS and 2.6.6 is the latest available via yum at this time.

Fortunately I came across this post which explains how to do the install perfectly without breaking anything (this is important now to keep things like yum running and in the future when 2.7.x is available for CentOS).  If you're not the least bit interested in Python I hope there's still a take-away.  Keep open the possibility of trying something new based on the use case and not the case of tools.

HTH,
Carl

Comments

Popular posts from this blog

ClassCastException: JAXB

Minishift on HyperV

Parallel to Lincoln's angry letters never sent concept...