Learn Python

_images/graduation_hat.png

There is plenty of material available on the web to help you learn Python by yourself. There are also several organizations that provide online courses. And perhaps your local school or University offers a course as well.

Practice

Once you know the basics, it’s good to practice your skills in order to improve them. Here are some sites where you can do that:

Transitioning from Matlab

If you are transitioning to Python from Matlab, you may find that some things work differently in Python.

  • Python searches for modules to import in selected directories that can be set in the PYTHONPATH, which you can set in the shell configuration dialog. Modules relative to the file being executed are only found if the file is executed as a script.
  • If a module is already imported, Python will not load it again (even if it has changed). You can use “execute as a script” to get a fresh interpreter.
  • Arrays are provided by the numpy package. Read more on differences between Numpy and Matlab.

Packages

If you want to get started with a certain library, you can in most cases best have a look at the library’s website and search for tutorials and documentation.

The Scipy Stack:

  • numpy - using arrays in Python
  • scipy - core scientific functionality
  • matplotlib - 2D plotting library
  • pandas - data structures and analysis
  • sympy - symbolic math
  • nose - software testing
  • IPython - advanced interactive shell

Further scientific packages:

Further non-science-specific packages:

Community

The Python community is known to be large and friendly. Python is used in a lot of areas, from web frameworks to scripting and GUI design. The scienfitic community is a fastly growing sub-community with many active members. Scipy.org is the best place to start for the scientific Python community.

Typically, each Python library has its own mailing list. Here are a few general ones:

It is also common to communicate with developers of a package via an issue on Github.