User Tools

Site Tools


lang:python:start

Python

About

Python is a general purpose interpreted languages useful in many different scenarios. It supports procedural, object-oriented and functional programming paradigms. Libraries already exist to ease interaction with XML, netCDF and web protocols as examples. Python also has an included library to interact with the OS and is a good language for scripting on both MS Windows and Unix-like operating systems.

Learning

The web abounds with Python tutorials and code snippets. Additionally, there are several free e-Books on Python covering either python or programming concepts in python. Below are some books and following some useful links.

Guidance

Python Guidance describes and outlines the tools to use and the standards that will be followed for python development in general. It also documents and outlines a production submission process.

e-Books & Misc. Tutorials

  • The Hitchhiker’s Guide to Python – A comprehensive discussion of Python and its ecosystem. I refer to it frequently.
  • Full Stack Python – A good reference for Python web development (isn't everything web these days?) and provides some really good information. I've read through the deployment sections and will do so again. I also used it as a launch pad for learning about Flask and Django.
  • Python Reading List – A starting point for Python reading and in order
  • Python Books Directory – The SharePoint library for Python books and tutorials
  • Dive Into Python – Good introductory book on just the python language
  • Think Python – How to think like a computer scientist – Good book introducing not just python but basic computer science subjects such as data structures and sorting algorithms
  • Problem Solving w/ Algos and Data Structs – A site based on the book by Brad Miller and David Ranum at Luther College. Seems decent and covers the basics, i.e. goes from stacks and lists to recursion and trees and then graphs.
  • Python Course – A short with a decent number of short tutorials on Python. Some introductory and some advanced.
  • Building Skills in Python – Good introductory book with some very good exercises. On top of his books you will find Mr. Lott all over StackOverflow, I have followed his advise and suggestions more than once.
  • Building Skills in Python PDF – The PDF copy of Mr. Lott's book, kept here for my convenience but I recommend using the web page.
  • Building Skills in Object Oriented Design – Once Python is mastered the next logical step is learning OOD and application. This book is a good place to start. Again from Mr. Steven Lott.
  • Building Skill in OOD PDF – The PDF copy of Mr. Lott's book, kept here for my convenience but I recommend using the web page, given above.
  • Python Programming – Generic book on the basics of the python language
  • NumPy Book – Covers the use of NumPy a library for manipulating large arrays and other large scientific datasets
  • NumPy Reference – Cover the nuts and bolts of using NumPy. A good reference once you have a basic understanding of NumPy
  • SciPy Reference – Scientific Python, incorporates NumPy, pupynere and many other scientific functions under one package. This book provides a good introduction to as well as a reference for.

General Python

  • PEP Index – The index of all Python Enhancement Proposals (PEPs)
  • Tuples, Lists & Dictionaries – best simple explanation of the differences between lists, tuples and dictionaries
  • Code like a Pythonista – A good review of some very helpful python tips
  • PythonSpeed – a discussion with useful tips on getting python to perform better
  • Snyppets – a listing of useful general purpose python code snippets
  • Porting to Python 3 – An online book discussing porting from Python 2 to Python 3. Leads me to believe the process will be easier than orginally thought.
  • Python Pitfalls – A decent list of Python pitfalls. A good review even for “experts”.

Anaconda

Advanced Python

  • Modules and Packages: Live and Let Die! – A talk by David Beazley on Python imports and other module related things. Three hours long but well worth it.
  • Super considered super! – Raymond Hettingers talk at PyCon 2015 on super(). This one hour talk is well worth it, especially the OrderedCounter example.
  • StackOverflow:Decorators – This is a very good answer to decorators and simply demonstrates how to use them and then the next answer fully explains the how and why they work.
  • StackOverflow:Metaclasses – The full explanation is written by the same person in the same manner as the decorators post above. Both are very good, in my opinion.
  • StackOverflow:Iterators – Again same person as above, this was apparently the first one and is done on iterators and the yield statement.
  • Python Packaging – A page discussing various ways to package and distribute Python programs.
  • Hackers Gonna Hack – A decent amount of stuff on how to make your Python more Pythonic. Need at least basic Python background and some OO knowledge to really get any benefit.

Documentation Tools and Methods

  • reStructured Text – Used for documentation purposes in all python code and docstrings. See coding standards for specific usage.
  • Sphinx – A documentation originally written for documenting Python projects. It has been used for a myriad of other types of documentation at this time. There is so much information on Sphinx its own page was needed.
  • Python API Doc – A list of all the python tools used to generate documentation, particularly API documentation
  • PyLit – Literate Programming is philophy of having documentation contain the code rather than the code contain the documentation. This is a different way of programming but potentially very powerful. Recommended reading, especially the links and references. This is not a new concept and was most eloquently implemented by Dr. Knuth in the 1980's.

Python Tools and Libraries

  • Python Build ToolsFIXME Write page about the python tools: pylint, pydoc, pep8, pychecker and pyflakes. Document how to get them installed and the process for using them.
  • PyPI – The Python Package Index
  • Command Line Library (argparse) – The main library for parsing command line arguments in Python in a Unix like fashion.
  • Byte Compile – a detailed description of how to “compile” python code for use in a “production” system
  • Python UNIX CLI Tools – a solid introduction to using python for creating command line tools
  • PyNGL – Pronounced 'pingle' this library is similar to matplotlib but was specifically designed for weather date by UCAR. An introduction to it and it's sister library PyNIO is easily found.
  • PyClimate – a library for doing common Climate calculations. If enough people are interesting we need to pursue getting it approved for use on our servers

GUIs and associated Frameworks

PyQt
  • PyQt Reference Guide – The reference guide for PyQt4 from the makers of. No, the previous sentence is not grammatically correct, I'll fix it later.
Tkinter
  • Unless you are forced to use Tkinter, security approval of software, bad managers, etc., DON'T. Use something like Qt instead.
  • Tkinter effbot Manual – A very good and effective manual (I use it regularly) on Tkinter written by Fredrik Lundh, author of such things as ElementTree.

XML, HTML, JSON and other data formats

  • xml2dict – Python module that makes working with XML feel like you are working with JSON. Yes, yes it does.
  • lxml – The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 and libxslt. It is unique in that it combines the speed and XML feature completeness of these libraries with the simplicity of a native Python API, mostly compatible but superior to the well-known ElementTree API (see next link).
  • ElementTree – The *ElementTree* wrapper type adds code to load XML files as trees of Element objects, and save them back again. This is almost a de facto standard for parsing XML in Python.

Errors and Exceptions

GIS in Python

  • ArcGIS Python – ESRI's help pages for dealing with the geoprocessor using Python

Honing Your Coding Skills

  • 40+ Best Programming Challenge Sites – A decent list to work from
  • CheckIO – A site that uses strictly Python to explore and solve many problems, most directly from CompSci textbook but it a fun story like manner.
  • Hacker Rank – I like their layout and problem sets, The site allows the use of multiple languages. Some subjects are required to use a given set of languages, i.e. for functional languages you must use a functional language, i.e. Haskell, Scala, Clojure, etc.
  • Project Euler – A site with over 350 problems to solve, any language can be used but python makes some of the problems trivial
  • Daily Programmer – From the site: “The focus of this subreddit is to provide bi-daily challenges to keep your mind and fingers busy between projects.”. They provide three challenges a week, Monday is easy, Wednesday is moderate and Friday is hard. Seems interesting so far.
  • Google Code Jam – Practice your skills using their problem set
  • StackOverflow Suggestions – A listing of some sites with problem sets for solving, although it is closed it did provide some good links
  • The Python Challenge – The first programming riddle on the net
  • OpenHatch – Learn open source tools and find open source projects to contribute to.
  • Software Carpentry – Helping scientist learn programming, it has some decent walk throughs and I'm still exploring.

Miscellaneous

My Experiences

Ternary, a problem I was given during a interview and my post attempts to solve it. The problem showed a real lack in my understanding of how Python works.

lang/python/start.txt · Last modified: 2016/12/01 19:54 by lowcloudnine