Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ch 1. A Python Q&A Session Spring 2009. Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.

Similar presentations


Presentation on theme: "Ch 1. A Python Q&A Session Spring 2009. Why do people use Python? Software quality Developer productivity Program portability Support libraries Component."— Presentation transcript:

1 Ch 1. A Python Q&A Session Spring 2009

2 Why do people use Python? Software quality Developer productivity Program portability Support libraries Component integration

3 Why do people use Python? Software quality  Python is designed to be readable, and hence reusable and maintainable  The uniformity of Python code makes it easy to understand, even if you didn’t write it  Python is deep support for software reuse mechanisms such as object-oriented programming (OOP)

4 Why do people use Python? Developer productivity  Python code is typically 1/3 to 1/5 the size of equivalent C++ or JAVA code  Less to type, less to debug, and less to maintain  Python programs run immediately, without compile and link steps of some other tools, further boosting programmer speed

5 Why do people use Python? Program portability  Most python programs run unchanged on all major computer platforms  Porting Python code between Linux and Windows, we just need copy a script’s code between machines  Offer multiple options for coding portable graphical user interfaces, database access programs, web-based systems  Even for operating system interfaces, are possibly portable in Python

6 Why do people use Python? Support libraries  A large collection of prebuilt and portable functionality, known as stand library  Be extended with homegrown libraries and third-party application support software  Third-party domains offer tools for website construction, numeric programming, serial port access, and game development  For example, NumPy, an extension almost equivalent to Matlab numeric programming system

7 Why do people use Python? Component integration  Python scripts can communicate with other parts of an application by integration mechanisms  Today, Python code can invoke C and C++ libraries, can be called from C and C++, can integrate with Java components  Communicate over such as frameworks COM,.NET  Interact over networks with interfaces like SOAP, XML, CORBA

8 What can I do with Python? System programming  Built-in interfaces to operating system services make it ideal to write system administration tools and utilities  Python programs can search files and directory trees, launch other programs, do parallel processing GUIs  A standard object-oriented interface to the Tk GUI API, Tkinter, allowing Python programs to implement portable GUIs  Other toolkits also can be used in Python

9 What can I do with Python? Internet scripting  Come with standard internet modules to allow Python to perform networking tasks  A large collection of third-party tools available on the web for doing Internet programming in Python Database programming  Interfaces to all commonly used relational databases systems such as Sybase, Oracle, etc Games, images, AI, XML and more

10 What are Python’s Technical Strength It’s OO It’s free It’s Portable It’s Powerful It’s Easy to use It’s Easy to learn

11 What is the Downside of Python? Perhaps the only downside to Python is that the execution speed may not always as fast as compiled languages such as C and C++ Python is not compiled all the way down to binary machine code, it compiled to byte code instead

12 Who Uses Python Today? 2007, roughly 1 million users of Python around the world Google and Yahoo currently use Python in Internet service The YouTube video sharing service is largely writing in Python IBM use Python for hardware testing BitTorrent peer-to-peer file sharing system is a Python program Industrial Light and Magic use Python in the production of movie animation JPMorgan chase apply Python for financial market forcasting NASA uses Python for scientific programming tasks For more details, visit www.python.orgwww.python.org

13 Install Python Links of Python download  Windows installer Windows installer  Mac installer Mac installer  Python tutorial Python tutorial

14 Install Python 1. Click the installer

15 Install Python 2. Click Next

16 Install Python 3. Click Next

17 Install Python 4. Choose the installation path, click Next

18 Install Python 5. Click Install

19 Install Python 6. Click Finish, then we can open Python in Pythonwin IDE or interactive shell modes

20 How do you run programs? Three different methods Interactive Coding Files (such as NotePad, WordPad) Integrated Development Environment (IDE)

21 Hello World Program Python program

22 “Hello World” in C C program main() { printf("hello, World!\n"); }

23 “Hello World” in Java Java program class helloworld { public static void main(String args[]) { System.out.println("Hello World!"); }

24 Some more Python codes 6+9 print 6+9 print “6+9” a=6+9 print a a=6 b=9 a+b

25 Some more Python codes


Download ppt "Ch 1. A Python Q&A Session Spring 2009. Why do people use Python? Software quality Developer productivity Program portability Support libraries Component."

Similar presentations


Ads by Google