Generating Tags for Python Code (including Subfolders)
If you want to create a "tags" file for use with vi / vim (or even emacs [makes sign of cross]), there are a couple of tools out there. ctags(1) comes with most modern OSs, but it doesn't do python. So hint 1: Use the script ptags.py that came with your python distribution [1]. To build tags for all python files in a directory the usage is something like:
ptags.py *.py
Hint 2: If you want to build tags for all python scripts in a folder hierarchy (say for some project) you can use:
find -X . -name \*.py -print | xargs ptags.pyThese of course assume that you moved ptags.py to somewhere in your shell's $PATH. Hint 3 would be the -X argument to find(1), it's a safety switch that tells find(1) to ignore filenames xargs would choke on.
1: If your system has python but doesn't have ptags.py, download the matching tarball from python.org, just untar it and find it in the contents (Tools/scripts/ptags.py).