Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Sunday, January 10, 2010

StdError Description in scripts

I never actually went that deep into the C code to understand the stderror codes that are returned in common bash scripts.

Recently, on a discussion thread from CoreUtils group, a simple implementation of error code translation caught my attention. Instead of relying on the errno.h file (which contains the list of errors with their respective brief description), you can incorporate secondary scripts (Perl, or Python) to do this job for you.

Thanks to Pádraig Brady for this:

$ test || python -c "import os; print $?, os.strerror($?);"
(you could just wrap this in a function).

Monday, December 7, 2009

Python, Python and Python

Just recently (a year ago, maybe) since I decided to move to python programming for real, motivated by the Google App Engine (GAE), and by the fact that Google is all about python.

I even started an open-source initiative at work (actually on my spare time and late hours at home), the JobTracker (a tool to monitor and measure team work), using Google's infrastructure on GAE. The results are good, although there is a lot of work to be done (database issues, performance, and reliability - Google went off-line 5 times unexpectedly since I started using). But the every day work from their team is noticeable and incentives all of us to use the framework.

Today I just got the news that I was not the only one affected by it, laughs... A report from Evans Data tells: New Survey Shows Python Use Has Risen 45% Since Google App Engine Debuted (the link requires registration).

For those interested in adventuring in python, I recommend:
Dive into Python


You can download this book for free. Useful for those coming from other languages (recommended to me by a friend).

And for those crazy about it already, I would take a pick at:

http://www.pythonchallenge.com/

Happy python programming!!!