-- AndrewCudd - 12 Jun 2015

Python Resources

This page contains a number of useful resources, links, tutorials, and help on the general use of the Python computing language. They are loosely grouped by topic and / or type of resource. The page should occasionally be updated with new information or resources. The content listed below is by no means exhaustive, there are many, many other resources available -- Google is your friend. This page just represents things that group members have found useful.

Python Version

Python has several different versions available for use, and should be chosen based on your requirements. The two main versions are Python 2.7 and Python 3.4 (the current stable 3.X release) where Python 2.7 is the last stable legacy release and Python 3.4 represents the current stable release of Python. The main difference between the two releases is that Python written using a 2.X release is in general not compatable with code written using a 3.X release. However the two different versions do still share many things in common and for some code it takes very little effort to switch from 2.X to 3.X or vice versa. Python 3.X contains many new features and tweaks to the language which are not present in any of the 2.X versions.

So which version of Python do you use? It may seem like an obvious choice to use the latest and greatest version of Python to get all the new features, and Python has a good page on how to choose which version to use over here. In general, if you can use the latest release of Python you should. The main reason for using an older version of Python is compatibility with other code, whether it's a plug-in or a library you want to use, or if it's code your collaborators are using. One of the nice things about Python is that different versions of python can exist side by side on the same machine with out problems or much effort needed. Then you simply call python2.7 or python3.4 (for example) in the command line to choose which version of Python to run.

Specifically for T2K at MSU, the HPCC has Python 2.7.2 and several libraries such as NumPy and SciPy installed by default. Then the choice of version has been already made unless you want to install your own local version of Python 3.4 (or some other version) along with any associated libraries. Installing a local version of Python is fairly easy to do however. Also Scientific Linux includes Python 2.7.5 by default on installation, and again, it is easy to install a different version of Python to use and have both versions exist side by side.


Topic revision: r2 - 23 Jun 2015, AndrewCudd

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback