This post originated from an RSS feed registered with Python Buzz
by Carlos de la Guardia.
Original Post: Google Code Search as a mentor and friend
Feed Title: I blog therefore I am
Feed URL: http://blog.delaguardia.com.mx/feed.atom
Feed Description: A space to put my thoughts into writing.
So far I have found the new Google Code Search
a very helpful tool. It offers a regexp based search syntax and the
possibility to search for a specific programming language, filename or
even license.
If, as I do, you like learning by looking at example code, you
know that sometimes finding a piece of code that does what you want to
learn is not very easy. Examples in the documentation (if they
exist) are usually very basic and seldom are enough to answer the
tricky questions that come later on.
Usually, browsing through a
piece of real-world working code that does something similar to what I
am looking for is enough to put me on the right track, which is where
Google Code comes in.
With millions of lines of Python code
available for searching, odds are you will find something related to
your objective. For instance, earlier today a friend asked me if I had
an example for pyinotify, which I have never used. A quick code search
yielded this result, which gave him something to work from.
I
have also very successfully used the code search to find out how to do
something in Zope or Plone. It is a great tool for finding boilerplate
code as well, those archetypes schemas and class definitions are prime
examples.
I know this is not the only codesearchtool, or even the first, but it is the one I found, and I am sticking to it for the time being.