Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intro to Python Programming (Introduction) Pamela A. Moore Zenia C. Bahorski Eastern Michigan University March 7, 2012 A language to swear by, not at.

Similar presentations


Presentation on theme: "Intro to Python Programming (Introduction) Pamela A. Moore Zenia C. Bahorski Eastern Michigan University March 7, 2012 A language to swear by, not at."— Presentation transcript:

1 Intro to Python Programming (Introduction) Pamela A. Moore Zenia C. Bahorski Eastern Michigan University March 7, 2012 A language to swear by, not at. 1

2 Intro to Python Programming Abstract… One of the new programming languages sweeping both education and practice is Python. This language is very intuitive while still being quite powerful. Python would be the perfect vehicle to teach programming in the secondary school before tackling Java. It has the added advantage of being freely available for both Mac and PC platforms. This session will instruct participants in how to create Python programs that can be used for general programming and scripting. Participants will receive a flash drive with all needed files pre-loaded. The course presupposes no familiarity with programming, but it would be helpful. http://people.emich.edu/zbahorski http://people.emich.edu/zbahorski 2

3 Topics Covered in Part 1 History of Python “What is” Python? Python License Agreement Where to Get Python How to Install Python How to Program in Python 3

4 History of Python Guido van Rossum (History at: http://docs.python.org/license.html) http://docs.python.org/license.html ◦ Began as a Christmas break “hobby” in 1989  Chose the name Python after the BBC comedy troupe Monty Python’s Flying Circus.  Inspiration: ABC, Modula-3, with a smattering of C  Van Rossum helped create ABC, a teaching language, in the early 1980’s (Foreword for “Programming Python” para. 4). ◦ Feb. 1990: First version distributed while at CWI ◦ 1995: Corporation for National Research Initiatives, Reston, Virginia ◦ May 2000: van Rossum and development team moved to BeOpen.com (PythonLabs team) ◦ October 2000: PythonLabs team moved to Digital Creations (now Zope Corporation) ◦ Now: at Google.com All versions were Open Source Latest versions: 2.7.1 & 3.2 (flash drives) Visualization of Python Project (contributors): ◦ http://vimeo.com/1093745 http://vimeo.com/1093745 4

5 What is Python? Python.org “Executive Summary”: ◦ Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. ◦ Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. ◦ Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. ◦ Python supports modules and packages, which encourages program modularity and code reuse. ◦ The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed. ◦ http://www.python.org/doc/essays/blurb.html http://www.python.org/doc/essays/blurb.html 5

6 What is Python? Some of its key distinguishing features include: ◦ very clear, readable syntax ◦ strong introspection capabilities ◦ intuitive object orientation ◦ natural expression of procedural code ◦ full modularity, supporting hierarchical packages ◦ exception-based error handling ◦ very high level dynamic data types ◦ extensive standard libraries and third party modules for virtually every task ◦ extensions and modules easily written in C, C++ (or Java for Jython, or.NET languages for IronPython) ◦ embeddable within applications as a scripting interface 6

7 What is Python? Operating Systems: ◦ Windows ◦ Linux/Unix ◦ OS/2 ◦ Mac ◦ Amiga ◦ among others. ◦ There are even versions that run on .NET.  Java virtual machine  Nokia Series 60 cell phones 7

8 Python License Agreement FREE and Open Source! This LICENSE AGREEMENT is between the Python Software Foundation (“PSF”), and the Individual or Organization (“Licensee”) accessing and otherwise using Python 2.7.1 software in source or binary form and its associated documentation. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 2.7.1 alone or in any derivative version, provided, however, that PSF’s License Agreement and PSF’s notice of copyright, i.e., “Copyright © 2001-2010 Python Software Foundation; All Rights Reserved” are retained in Python 2.7.1 alone or in any derivative version prepared by Licensee. In the event Licensee prepares a derivative work that is based on or incorporates Python 2.7.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 2.7.1. 8

9 Where to Get Python http://python.org/download/ Python 2.7.2 or Python 3.2.2 ◦ Both are “considered stable” ◦ Macs & those writing 3 rd party software use 2.7.2 (compatibility issues!) ◦ All library updates will happen to 3.x ◦ BUT >>> PC version of Python >> You need to be familiar with paths! >>> Alternative >> ◦ (See next page) 9

10 How to Install Python Great, FAST, Installation instructions at: ◦ http://www.richarddooling.com/index.php/200 6/03/14/python-on-xp-7-minutes-to-hello- world/ ◦ Gives great directions and link to: ActiveState: ActiveState: ◦ http://www.activestate.com/activepython/dow nloads 10

11 How to Install Python We downloaded the program file to the flash drive (from ActiveState) Double-click on the filename will automatically start the install wizard ◦ Keep clicking next for default install until done ◦ Install is complete 11

12 How to Install Python Where did Python go? ◦ Start >> ◦ All Programs >> ◦ ActiveState ActivePython 2.7 (32 bit) >> ◦ IDLE (Python GUI) You are Ready to speak “Parseltongue” 12

13 How to Program in Python On to Programming in Python… 13


Download ppt "Intro to Python Programming (Introduction) Pamela A. Moore Zenia C. Bahorski Eastern Michigan University March 7, 2012 A language to swear by, not at."

Similar presentations


Ads by Google