Tuesday, February 12, 2013

pywhich, like the Unix which tool, for Python modules

pywhich 1.0.1 : Python Package Index

Saw it via a search for related tools.

Interesting idea.

I once wrote a which utility for Windows in C, not exactly the same as the standard Unix which tool, but somewhat customized for Windows.

The author of pywhich says on the site that he later found that others had written the same sort of tool as his pywhich, so I did a Google search for pywhich and found some more like it:

https://github.com/tbarron/backscratcher/blob/master/pywhich.py

https://github.com/lericson/lericson-verktyg/blob/master/pywhich

Writing command-line utilities (whether in C or a higher-level language like Python, Perl or Ruby), is good fun and also can be quite useful for projects one works on. Even with the ongoing move of software and hardware to the cloud, a lot of command-line tools are still needed and being written to manage cloud-based systems.

If you want to learn to write command-line utilities in C, on Unix/Linux or similar operating systems (Mac OS X, *BSD), you may like to check out my tutorial on the topic, on IBM developer Works:

Developing a Linux command-line utility:

http://www.ibm.com/developerworks/linux/library/l-clutil/

Thought the tutorial is written for C, many of the concepts explained apply to command-line utilities developed in higher-level languages too.

- Vasudev Ram
www.dancingbison.com

No comments: