basic_python/intro.rst
author Santosh G. Vattam <vattam.santosh@gmail.com>
Thu, 20 Aug 2009 22:42:58 +0530
changeset 31 01ea4544ad81
parent 3 f095fc984608
child 32 628d035d559a
permissions -rw-r--r--
Added content to introduction.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     1
=====================
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     2
Basic Python Workshop
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     3
=====================
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     4
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     5
This document is intended to be handed out at the end of the workshop. It has
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     6
been designed for Engineering students who are Python beginners and have basic
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     7
programming skills. The focus is on basic numerics and plotting using Python.
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     8
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
     9
The system requirements:
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    10
  * Python - version 2.5.x or newer.
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    11
  * IPython 
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    12
  * Text editor - scite, vim, emacs or whatever you are comfortable with.
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    13
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    14
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    15
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    16
31
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    17
1. Introduction
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    18
===============
1
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    19
31
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    20
The Python programming language was created by a dutch named Guido van Rossum.
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    21
The idea of Python was conceived in December 1989. The name Python has nothing
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    22
to do with the reptilian, but its been named after the 70s comedy series 
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    23
"Monty Python's Flying Circus", since it happens to be Guido's favourite 
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    24
TV series. 
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    25
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    26
Current stable version of Python is 2.6.x, although Python 3.0 is also the stable
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    27
version, it is not backwards compatible with the previous versions and is hence
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    28
not entirely popular at the moment. This material will focus on the 2.6.x series.
1
dccb80025455 Added Basic Python Handout rst document.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents:
diff changeset
    29
  
31
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    30
Python is licensed under the Python Software Foundation License (PSF License) 
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    31
which is GPL compatible Free Software license (excepting license version 1.6 and 2.0)
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    32
It is a no strings attached license, which means the source code is free to modify
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    33
and redistribute.
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    34
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    35
The Python docs define Python as "Python is an interpreted, object-oriented, 
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    36
high-level programming language with dynamic semantics." A more detailed summary
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    37
can be found at http://www.python.org/doc/essays/blurb.html. Python is a language that
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    38
has been designed to help the programmer concentrate on solving the problem at hand
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    39
and not worry about the programming language idiosyncrasies.
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    40
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    41
Python is a highly cross platform compatible language on account of it being an 
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    42
interpreted language. It is highly scalable and hence has been adapted to run on 
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    43
the Nokia 60 series phones. Python has been designed to be readable and easy to use
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    44
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    45
**Resources available for reference**
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    46
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    47
* Web: http://www.python.org
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    48
* Doc: http://www.python.org/doc
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    49
* Free Tutorials:
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    50
    * Official Python Tutorial: http://docs.python.org/tut/tut.html
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    51
    * Byte of Python: http://www.byteofpython.info/
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    52
    * Dive into Python: http://diveintopython.org/
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    53
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    54
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    55
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    56
1.1 The Python Interpreter
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    57
--------------------------
01ea4544ad81 Added content to introduction.
Santosh G. Vattam <vattam.santosh@gmail.com>
parents: 3
diff changeset
    58