python

Python Resources

This text provides an introduction to Python for science and engineering applications but is hardly exhaustive. There are many other resources that you will want to tap. Here I point out several that you may find useful.

Web resources

The best web resource for Python is a good search engine like Google. Nevertheless, I list a few web sites here that you might find useful. I have successfully resisted any attempt to be exhaustive so that the list is actually useful. Nevertheless, if you find a really cool site that you think should be on this list, please let me know.

http://www.python.org/
The official Python web site. I almost never look here.

http://docs.python.org/3/reference/
Sometimes I look here for detailed information about Python 3, which is the version used in this manual. Documentation for the previous version, Python 2, is available at http://docs.python.org/2/reference/

http://docs.scipy.org/doc/numpy/reference/
I usually start here when I need information about NumPy. It has links to just about all the NumPy documentation I need. By the way, I say "num-pee", which rhymes with "bumpy"---a lot of people say "num-pie", which doesn't sound like English to me.

http://docs.scipy.org/doc/scipy/reference/
I start here when I need information about SciPy, its various packages and their functions. I say "psy-pi" for SciPy, like everyone else. Who says I have to be consistent? (see Emerson)

http://matplotlib.org/api/pyplot_summary.html
The Plotting Commands Summary page for MatPlotLib. It has a search feature and links to all the MatPlotLib documentation, which I use a lot. You can go the the main MatPlotLib page, http://matplotlib.org/, but frankly, it's less useful. The site http://www.loria.fr/~rougier/teaching/matplotlib/ is also useful for learning some MatPlotLib tricks.

http://ipython.org/
I go to this page mostly to learn about IPython Notebook (http://ipython.org/notebook.html) but it's also useful if you need information about the IPython interpreter, especially if you want to find out more about IPython magic commands.

http://scipy-lectures.github.io/
This link provides a web-based quick introduction to scientific Python that assumes you have some experience programming (not necessarily in Python). It's terser than my introduction, but covers some useful topics that I do not cover.

single: Anaconda; resources

http://docs.continuum.io/anaconda/index is the location for documentation for Anaconda python

single: Spyder; resources

https://pythonhosted.org/spyder/index.html

Doucumentation for Spyder, the Integrated Development Environment provided with with Anaconda.

single: Anaconda; resources

http://continuum.io/
Anaconda provides a free distribution of Spyder with a comprehensive package manager, and may be the best choice for power users of Python for scientific programming. The package manager is run by line commands from a terminal window, which may put off beginners. Anaconda can be downloaded from https://store.continuum.io/cshop/anaconda/.

http://www.scipy.org/Mailing_Lists
Go here if you want to sign up for a mailing list for NumPy or SciPy, or if you want to report a bug. Mailing lists give you access to a community of developers and users that can often provide expert help. Just remember to be polite and respectful of those helping you and also to those posting questions.

https://lists.sourceforge.net/lists/listinfo/matplotlib-users
The mailing list for MatPlotLib. See paragraph immediately above.

http://stackoverflow.com/
StackOverflow may just be your best friend when it comes to solving problems using Python. You pose your question about whatever problem you are having with Python and other people write answers. The answers are monitored and the best survive. In fact, most of the questions you will pose have already been posed by someone else and answered. So you can just look up the answer to most of your questions. StackOverflow is a wonderful resource.

Books

There are a lot of books on Python and there is no way I can provide reviews for all of them. I have found that the book by Mark Lutz, Learning Python, published by O'Reilly Media does the trick for most people. It doesn't have anything special for scientific programming, and thus does not cover the NumPy, SciPy, or MatPlotLib packages, but for just about everything else, it's an excellent resource. It gives a good introduction to object oriented programming, or OOP, which I say little about in this text. The 3rd edition of the book covers Python 2 while the 4th and 5th (current) editions cover Python 3. You are probably better off getting the latest edition as everybody will soon be using Python 3. If you are using Python 2, as we do in this text, you can easily enough figure out the differences between Python 3 and 2.