learning python - part 1
DESCRIPTION
Learning python series based on "Beginning Python Using Python 2.6 and P - James Payne" book presented by Koosha Zarei.TRANSCRIPT
![Page 1: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/1.jpg)
Learning PythonPart 1 | Winter 2014 | Koosha Zarei | QIAU
![Page 2: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/2.jpg)
Part 1
![Page 3: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/3.jpg)
3February 2014Learning Python | Part 1 | Koosha Zarei
ReferencesWhat is Python?Why Python?What can we do with Python?What is the downside?Who use Python?Alternative ImplementationsInstallation and ConfigurationModule, File, and ScriptHow to run programsDebugging Python CodeUseful Links
Content
![Page 4: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/4.jpg)
4February 2014Learning Python | Part 1 | Koosha Zarei
RefereesLearning Python, Fourth Edition, Mark Lutz, 2009, O’Reilly Media, Inc.Beginning Python® Using Python 2.6 and Python 3.1, James Payne, Wiley Publishing, Inc.
Python.org
![Page 5: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/5.jpg)
5February 2014Learning Python | Part 1 | Koosha Zarei
What is Python?Python
Is a General Purpose ,High Level Programming Language.Supports multiple programming paradigms. Features a dynamic type system.Support Automatic memory management.Contains Large and comprehensive standard library.
![Page 6: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/6.jpg)
6February 2014Learning Python | Part 1 | Koosha Zarei
Why Python?Software quality.
Readability, maintainability.
Developer productivity.Less to type, less to debug, and less to maintain.No compile, No Linking step.
Program portability.Cross platform.
Support libraries.
![Page 7: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/7.jpg)
7February 2014Learning Python | Part 1 | Koosha Zarei
Why Python?Component integration.
C, C++, .NET, XML.
Enjoyment.Built-in tool-set.
English keywords.Small core, large standard library, and an easily extensible interpreter.
![Page 8: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/8.jpg)
8February 2014Learning Python | Part 1 | Koosha Zarei
Why Python?High level dynamic data type.Automatic memory management.Free and Open Source.GUI support.
Python is commonly defined as an object-oriented scripting language.
![Page 9: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/9.jpg)
9February 2014Learning Python | Part 1 | Koosha Zarei
What can we do with Python?GUI.Systems Programming.Database Programming.Internet Scripting.Numeric & Scientific Programming.Natural Language Analysis.Rapid Prototyping.Gaming, Images, Serial Ports, XML, Robots, and more.
![Page 10: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/10.jpg)
10February 2014Learning Python | Part 1 | Koosha Zarei
What is the downside?Execution Speed
Execution speed may not always be as fast ascompiled languages such as C and C++.
Source Code Byte Code Interpreter
![Page 11: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/11.jpg)
11February 2014Learning Python | Part 1 | Koosha Zarei
Who use Python?1 million users.Google, YouTube, BitTorrent.Intel, Cisco, Hewlett-Packard, Seagate, Qualcomm, and IBM.Industrial Light & Magic, Pixar.NASA, Los Alamos, Fermilab and JPL.
![Page 12: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/12.jpg)
12February 2014Learning Python | Part 1 | Koosha Zarei
Alternative Implementations
Three Primary ImplementationCpython
Original, Reference and standard.Jython
JavaIronPython
.NET framework
All implement the same Python language but execute programs in different ways
![Page 13: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/13.jpg)
13February 2014Learning Python | Part 1 | Koosha Zarei
Installation and ConfigurationPre-installed on various OS:
Linux: Python 2.Mac OS X: Python 2.Windows: noting!
Download from official website.
'Python -V'Shows version of installed python
Learning Python, Mark Lutz, APPENDIX A
![Page 14: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/14.jpg)
14February 2014Learning Python | Part 1 | Koosha Zarei
Module, File, and ScriptModules:
Text files containing python statements.Ready to execute any number of time and in a variety of ways.Module files are often referred to as programs.Module files that are run directly are also sometimes called scripts.File(s) imported from another file.Packages of additional tools.
![Page 15: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/15.jpg)
15February 2014Learning Python | Part 1 | Koosha Zarei
How to run programsI. The Interactive PromptII.Running Files with Command LinesIII.The IDE User Interface
![Page 16: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/16.jpg)
16February 2014Learning Python | Part 1 | Koosha Zarei
How to run programsThe Interactive Prompt
Simplest wayExperimentingTestingLinux
Just type PythonWindows
Start IDLE’s main windowSelect “Python (command line)”
/usr/local/bin/python/usr/bin/python
C:\Python30\python
![Page 17: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/17.jpg)
17February 2014Learning Python | Part 1 | Koosha Zarei
How to run programs
![Page 18: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/18.jpg)
18February 2014Learning Python | Part 1 | Koosha Zarei
How to run programsRunning Files with Command Lines
Execute python command in terminal by passing the script name.
Run Python Scripts: “python script.py”
Some basic information about command:python -h
![Page 19: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/19.jpg)
19February 2014Learning Python | Part 1 | Koosha Zarei
How to run programsThe IDE User Interface
Integrated Development Environment, Binds together various development tasks into a single view.IDLE
Python program that uses the standard library’s tkinter GUI toolkit to build the IDLE GUI.
Eclipse and PyDev.Komodo.NetBeans IDE for Python.PythonWin.Anjuta.
![Page 20: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/20.jpg)
20February 2014Learning Python | Part 1 | Koosha Zarei
How to run programsThe IDE User Interface
Features:For Authoring, Modifying, Deploying, and Debugging.Interactive debuggerIntegrated compiler/interpreterCode completionProject managementVersion control
Wikipedia | More info about IDE
![Page 21: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/21.jpg)
21February 2014Learning Python | Part 1 | Koosha Zarei
Debugging Python CodeStrategies for debugging Python:
Do Nothing!Python interpret shows very useful error message facing mistakes by default.
PrintFast execution.
IDE DebuggerTrace code in more detail.
pdbAvailable as a module in Python's standard library.
![Page 22: Learning python - part 1](https://reader033.vdocuments.site/reader033/viewer/2022050903/5406e93a8d7f7288088b488a/html5/thumbnails/22.jpg)
22February 2014Learning Python | Part 1 | Koosha Zarei
Useful Linkspyvideoshowmedo.combestechvideos.comtutorialspoint.com