1 / 15

An Introduction to Python

Biju Chacko <biju_chacko@vsnl.net> BC Consulting. An Introduction to Python. Introduction. Who am I (or “Why should you listen to me ?”) Disclaimer (or “Why you shouldn't listen to me!”) :-) Please present questions at the end of the talk. Scope of the Talk. Not a Tutorial.

rhian
Download Presentation

An Introduction to Python

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Biju Chacko <biju_chacko@vsnl.net> BC Consulting An Introduction to Python

  2. Introduction • Who am I (or “Why should you listen to me ?”) • Disclaimer (or “Why you shouldn't listen to me!”) :-) • Please present questions at the end of the talk.

  3. Scope of the Talk • Not a Tutorial. • Is not a substitute for the manual. • Give you a “feel” for the language and it's features. • Inspire you to give a shot. (hopefully) ;-)

  4. A Little History • What is Python? • an interpreted, interactive, object-oriented programming language. • Who wrote Python? • Guido van Rossum in 1990 in Amsterdam

  5. How can you use Python? • Standard Interpreted Scripting Language • CGI • mod_python • Embedded Command Langauge • JVM (with full access to Java Classlib)

  6. Hello World • Basic Hello World: #!/usr/bin/env python print 'Hello World!' • GUI Hello World • See hello.py

  7. Structure of the Language • Dynamic Typing • Rich set of Data Structures: • Lists • Tuples • Dictionaries • Exception Handling • Classes

  8. Neat Stuff in the Standard Library • Too much to list here • Pickle: object persistence • Regex • Threading and Synchonization (warning!) • GUI building with Tk.

  9. Neat Stuff in the Standard Library (contd.) • Internet tools • Urllib2: open arbitrary urls • Clients: ftp, pop, imap, smtp, telnet, nntp and http protocols. • Http server • Socket server/client • Buzzword-compliancy • XML: SAX and DOM xml parsers • Xml-rpc client

  10. Neat Stuff that isn't in the Standard Library • PyGTK: easy GUI building, supports glade. • WxPython: cross platform GUI (Windows, *nix, MacOS) • Scintilla: cross platform Editing component.

  11. Notable Python Projects • Zope: the mother of all CMSes • The late lamented CML2 • Many of Red Hat's admin and installation tools

  12. Pros and Cons of Python • Pros • Clear readable syntax • Rich library • High productivity • Maintainability • Cross Platform

  13. Pros and Cons of Python (contd.) • Cons • Syntactic significance of indentation. • No CPAN • No standard DB access library like Perl::DBI • Slower than compiled languages • My opinion: Python vs Perl

  14. Resources • http:///www.python.org • Why Python? By ESR • http://www.linuxjournal.com/article.php?sid=3882 • Perl Hacker compares Perl & Python • http://www.perl.com/pub/a/language/versus/python.html

  15. Questions?

More Related