Odds and Ends - Python Bootcamp
Argument parsing using argparse
sys.argv yourself can be quite a pain. If your program takes
more than one or two fixed arguments, it can be very handy to use
does all the hard work for you. Take a look at the concordance
example to see this in use.
Many simple tasks like constructing dictionaries with default values and keeping track of counts are made easier by the defaultdict and Counter classes. Take a look at the documentation on collections for an overview.
Check out NumPy and SciPy. NumPy provides an array type, linear algebra functions, Fourier transform, and a number of other handy numeric features. SciPy provides routines for optimization and integration, reading MATLAB structures, and a number of other useful things.