Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland

Download Report

Transcript Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland

Introduction to Python
John Alexis Guerra Gómez
CMSC433 Spring 2010
University of Maryland
Definition



Python is an easy to learn, powerful
programming language.
It has efficient high-level data structures and a
simple but effective approach to object-oriented
programming.
Python’s elegant syntax and dynamic typing,
together with its interpreted nature, make it an
ideal language for scripting and rapid
application development in many areas on most
platforms.
More definition


Python is cross platform (for many platforms).
The standard library is huge, very useful, and is
very well documented.


http://docs.python.org/library/
Many companies make significant use of it


Google uses it for a lot of their internal software
projects
David Bagget (speaking Tuesday) uses it in his
start up company
The Interactive mode
aguerra@eltiestico2:~$ python
Python 2.6.2 (release26-maint, Apr 19 2009,
01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> print "Hola mundo"
Hola mundo
Working with a file

Save your file as hola.py

Run it with
python hola.py
Basic types
• Numbers
• Strings
• Lists
• Tuples
• Maps
• Functions
Basic Data Types
Lists
Tuples
Dictionaries
Functions
Functional Programming
Lists Comprehension
From Java to Python

http://www.razorvine.net/python/PythonForJavaProgrammers
Google's developers Python Lecture

http://www.youtube.com/watch?v=tKTZoB2Vjuk
Some other things

One of the things that I really like of Python is
that you can use it for almost anything
You like video games


http://www.pygame.org
http://home.gna.org/oomadness/en/soya3d/inde
x.html
Scientific Work

http://www.scipy.org/

http://matplotlib.sourceforge.net/
Web developing

http://www.djangoproject.com/

http://turbogears.org/
Database Access

http://www.sqlobject.org/
GUI Development

http://www.wxpython.org/

http://www.pygtk.org/

http://wiki.python.org/moin/PyQt
Image manipulation

http://www.pythonware.com/products/pil/
More

http://wiki.python.org/moin/UsefulModules