[Skip Navigation] [CSUSB] / [CNS] / [CSE] / [R J Botting] / [Samples] / python
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Comment/Contact] [Search ]
Fri Nov 16 13:24:52 PST 2012

Contents


    Notes on The Python Programming Language

      This Page In Other Languages

      [ python-be ] Belorussian translation by Bohdan Zograf.

      [ http://cloudlakes.com/python/ ] Bulgarian translation by Dimitar Teykiyski, hosted courtesy of [ http://cloudlakes.com ] the Cloud Lakes Team.

      History of Python

      The following is from an anonymous donor
      1. Python was invented by Guido Van Rossum in 1990.
      2. At the time, Guido was working on the Amoeba distributed operating system. Python was to be the scripting language for this OS.
      3. Python was influenced by the teaching language ABC (on which Guido had worked) as well as many other programming languages.
      4. It was named after Monty Python, because of Guido's great love for Flying Circus and other Python productions.
      5. The first public release was in 1991.
      6. The comp.lang.python usenet group founded in 1994. Still active on Google Groups in 2010.
      7. Python was free as in speech from the beginning.

      (EMail Date: Sun, 08 May 2005 04:38:41 -0700 (PDT))

      Mon Feb 14 13:37:20 PST 2011: It looks like Python is still evolving... With two current versions: 2.7 and 3. Python 3 is a large leap forward.

      Experimenting with Python

      Python is available on just about every modern operating system.

      On Unix based systems (including Linux distributions and Apple Macs) it is already installed and ready to go.

      If you have python installed on your computer the command

       		python
      will let you input commands and definitions etc. interactively. You can exit by tapping the end-of-file character -- on UNIX/Linux CTRL-D.

      Try [ http://codepad.org/ ] or [ http://pythonfiddle.com/ ] to input and execute Python programs over the web.

      Python encourages embedded documentation

      List possible methods
       		dir(object)
      lists the data and methods associated with the object.

      Find out about a method

       		help(object.method)
      outputs the documentation for the method when applied to the object.

      Python programming puzzles

      Here is a Myst-y challenge [ http://www.pythonchallenge.com/ ] that sets you a series of puzzles to solve using python.

      Python 3 Tutorials

      [ http://docs.python.org/py3k/ ] [ http://diveintopython3.org/ ] [ results?search_query=python+3+tutorial&aq=f ] (Video) [ Python_en:Table_of_Contents ]

      Neat Examples of Python


      (Sudoku): Peter Norvig's elegant and literate Python Sudoku solver [ sudoku.html ]

      Syntax of Python

      Python is one of the rare languages that uses indentation to indicate structure[Note1].

      Back in 2003 Andrew Thanalertvisuti CS Honors Project at CSUSB documented the syntax of Python. These pages have been removed from the student web server after a crash. The following resources describe the syntax for Python. Here are some sources. [ grammar.html ] (2.7 HTML EBNF), [ grammar.txt ] (2.5 Txt Grammar), [ http://www.flickr.com/photos/nicksieger/281055485/ ] (image).

      I'm translating the 2.5 TXT version into a XBNF/MATHS version: [ python.syntax.html ] (XBNF) , let me know if and when errors creep in. I am also adding notes on differences between Python 2.* and Python 3.*.

      I also have a draft [ python.lexicon.html ] listing many of the 80+ basic symbols/lexemes in Python.

      The following Google search is a backup if the above fail. [ search?q=python+grammar ]

      Data Model

      [click here [socket symbol] PythonData if you can fill this hole]

      Semantics

      [click here [socket symbol] PythonSemantics if you can fill this hole]

      Versions of Python

      Here is an incredible spreadsheet showing how features have been added and removed, version by version: [ pub?key=0At5kubLl6ri7dHU2OEJFWkJ1SE16NUNvaGg2UFBxMUE&gid=0 ]

      See Also

        Demonstrations and Examples of Python

        [ python-for-math-teachers.html ]

        Comparisons and Introductions

        Language of the month: [ http://www.scdi.org/languages/python/ ]

        Python Home Page and Newsgroup

        home: [ http://www.python.org/ ]

        newsgroup [ comp.lang.python ] (unmoderated so it has spam).

        Language Reference Manual

        [ http://docs.python.org/reference/ ] (Version 2.7 November 07 2010), [ http://docs.python.org/py3k/reference/ ] (Version 3.1 November 7th 2010).

        Also follow links on [ Python.html ]

        Introductions to Python

        [ python.html ]

        Extensions


        (SIKULI): Fri Jan 22 11:02 2010. Saw this on Slash Dot. A language that makes it easy to automate tasks by mixing Python like syntax with GUI elements. For example you can take a snapshot of a button on the screen and drag it into a script as an argument of a "click(_)", "wait(_)", "input(_)", etc. function. Here [ http://sikuli.csail.mit.edu/ ] is the link to the project site at MIT. The drag and drop feature is like the MIT Scribble language.

      . . . . . . . . . ( end of section See Also) <<Contents | End>>

      Notes


        (Note1): The languages OCCAM and CODIL also used indentation in a similar way.

      . . . . . . . . . ( end of section Notes on the Python Programming Language) <<Contents | End>>

    End