SlideShare a Scribd company logo
1 of 8
Download to read offline
NDATA SCHOOL OF CLIMATE AND EARTH SCIENCES
EARTH SCIENCES DEPARTMENT
Geo-Information Science
Section
Object Oriented Programming: OBOP 210 – Python
Prepared By
Emmanuel Chinkaka
echinkaka@must.ac.mw
Introduction to Python
⚫ Python is a high-level programming language
⚫ Open source and community driven
⚫ “Batteries Included”
– a standard distribution includes many modules
⚫ Dynamic typed
⚫ Source can be compiled or run just-in-time
⚫ Similar to perl, tcl, ruby
Why Python?
⚫ Unlike AML and Avenue, there is a
considerable base of developers already using
the language
⚫ “Tried and true” language that has been in
development since 1991
⚫ Can interface with the Component Object
Model (COM) used by Windows
⚫ Can interface with Open Source GIS toolsets
Why not Visual Basic?
⚫ Visual Basic is still the method of configuring
and customizing ArcMap
⚫ If you have a button on the toolbar, it’s VB
⚫ Python scripts can be placed in ArcToolbox
⚫ Python can be run from the command line
without ArcMap or ArcCatalog being open
⚫ Using just the GIS Engine, lower overhead
⚫ Rapid prototyping, ease of authoring, etc.
Python Interfaces
⚫ IDLE – a cross-platform Python development
environment
⚫ PythonWin – a Windows only interface to
Python
⚫ Python Shell – running 'python' from the
Command Line opens this interactive shell
⚫ For the exercises, we'll use IDLE, but you can
try them all and pick a favorite
IDLE – Development Environment
⚫ IDLE helps you
program in Python
by:
– color-coding your
program code
– debugging
– auto-indent
– interactive shell
Example Python
⚫ Hello World
print “hello world”
⚫ Prints hello world to
standard out
⚫ Open IDLE and try it
out yourself
⚫ Follow along using
IDLE
Additional Python Resources
⚫ Python Homepage
http://www.python.org/
⚫ Dive Into Python
http://www.diveintopython.org/
⚫ Learning Python, 3rd Edition
http://www.oreilly.com/catalog/9780596513
986/
⚫ Getting Started Writing Geoprocessing Scripts
Available on ESRI's support page

More Related Content

What's hot

Programming Project Part 6
Programming Project Part 6Programming Project Part 6
Programming Project Part 6Bobby Billings
 
Guided overview of software frameworks qt framework
Guided overview of software frameworks   qt frameworkGuided overview of software frameworks   qt framework
Guided overview of software frameworks qt frameworkBenjamin Cottrell
 
Cloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT ApplicationsCloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT ApplicationsCorley S.r.l.
 
EEF : Sexy Properties, Wizards and Views - EclipseCon 11
EEF : Sexy Properties, Wizards and Views - EclipseCon 11EEF : Sexy Properties, Wizards and Views - EclipseCon 11
EEF : Sexy Properties, Wizards and Views - EclipseCon 11Chauvin Mariot
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonSoba Arjun
 
Python debuggers slides
Python debuggers slidesPython debuggers slides
Python debuggers slidesmattboehm
 
Microsoft .Net Framework
Microsoft .Net FrameworkMicrosoft .Net Framework
Microsoft .Net FrameworkRohit Rao
 
.Net overview
.Net overview.Net overview
.Net overviewteach4uin
 
Overview of microsoft dot net platforms
Overview of microsoft dot net platformsOverview of microsoft dot net platforms
Overview of microsoft dot net platformsAbhijit B.
 
Introduction to Android with Kotlin: Дончо Минков (Telerik Academy)
Introduction to Android with Kotlin:  Дончо Минков (Telerik Academy)Introduction to Android with Kotlin:  Дончо Минков (Telerik Academy)
Introduction to Android with Kotlin: Дончо Минков (Telerik Academy)PlovDev Conference
 
DevFest Santo Domingo - Kotlin DSL
DevFest Santo Domingo - Kotlin DSLDevFest Santo Domingo - Kotlin DSL
DevFest Santo Domingo - Kotlin DSLNicolas Fränkel
 

What's hot (20)

Programming Project Part 6
Programming Project Part 6Programming Project Part 6
Programming Project Part 6
 
SynapseIndia dotnet development framework
SynapseIndia  dotnet development frameworkSynapseIndia  dotnet development framework
SynapseIndia dotnet development framework
 
Guided overview of software frameworks qt framework
Guided overview of software frameworks   qt frameworkGuided overview of software frameworks   qt framework
Guided overview of software frameworks qt framework
 
.Net Introduction
.Net Introduction.Net Introduction
.Net Introduction
 
Cloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT ApplicationsCloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT Applications
 
EEF : Sexy Properties, Wizards and Views - EclipseCon 11
EEF : Sexy Properties, Wizards and Views - EclipseCon 11EEF : Sexy Properties, Wizards and Views - EclipseCon 11
EEF : Sexy Properties, Wizards and Views - EclipseCon 11
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Basic C# and .net
Basic C# and .netBasic C# and .net
Basic C# and .net
 
CV Juhani Polvi
CV Juhani PolviCV Juhani Polvi
CV Juhani Polvi
 
201801 CSE240 Lecture 04
201801 CSE240 Lecture 04201801 CSE240 Lecture 04
201801 CSE240 Lecture 04
 
Python debuggers slides
Python debuggers slidesPython debuggers slides
Python debuggers slides
 
Microsoft .Net Framework
Microsoft .Net FrameworkMicrosoft .Net Framework
Microsoft .Net Framework
 
ASP.NET Core 101
ASP.NET Core 101ASP.NET Core 101
ASP.NET Core 101
 
Net framework
Net frameworkNet framework
Net framework
 
.Net overview
.Net overview.Net overview
.Net overview
 
Evalution about programming language part 1
Evalution about programming language part 1Evalution about programming language part 1
Evalution about programming language part 1
 
Overview of microsoft dot net platforms
Overview of microsoft dot net platformsOverview of microsoft dot net platforms
Overview of microsoft dot net platforms
 
Introduction to Android with Kotlin: Дончо Минков (Telerik Academy)
Introduction to Android with Kotlin:  Дончо Минков (Telerik Academy)Introduction to Android with Kotlin:  Дончо Минков (Telerik Academy)
Introduction to Android with Kotlin: Дончо Минков (Telerik Academy)
 
DevFest Santo Domingo - Kotlin DSL
DevFest Santo Domingo - Kotlin DSLDevFest Santo Domingo - Kotlin DSL
DevFest Santo Domingo - Kotlin DSL
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 

Similar to Obop 210 lecture 2 python documentation

Python Programming Unit1_Aditya College of Engg & Tech
Python Programming Unit1_Aditya College of Engg & TechPython Programming Unit1_Aditya College of Engg & Tech
Python Programming Unit1_Aditya College of Engg & TechRamanamurthy Banda
 
Scale machine learning deployment
Scale machine learning deploymentScale machine learning deployment
Scale machine learning deploymentGang Tao
 
Top Five Reasons for Choosing Python Programming
Top Five Reasons for Choosing Python Programming  Top Five Reasons for Choosing Python Programming
Top Five Reasons for Choosing Python Programming Lesa Cote
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 
Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)Rr
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming BasicsDhana malar
 
Ali alshehri c++_comparison between c++&python
Ali alshehri c++_comparison between c++&pythonAli alshehri c++_comparison between c++&python
Ali alshehri c++_comparison between c++&pythonAliAAAlshehri
 
Python as Web Development
Python as Web Development Python as Web Development
Python as Web Development SamWas1
 
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdfDr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdfRahulSingh190790
 
Python programming ppt.pptx
Python programming ppt.pptxPython programming ppt.pptx
Python programming ppt.pptxnagendrasai12
 
Comparison between python and c++
Comparison between python and c++Comparison between python and c++
Comparison between python and c++ssusera7faf41
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythoneShikshak
 
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
Introduction to Python GUI development with Delphi for Python - Part 1:   Del...Introduction to Python GUI development with Delphi for Python - Part 1:   Del...
Introduction to Python GUI development with Delphi for Python - Part 1: Del...Embarcadero Technologies
 
Apache Beam: Lote portátil y procesamiento de transmisión
Apache Beam: Lote portátil y procesamiento de transmisiónApache Beam: Lote portátil y procesamiento de transmisión
Apache Beam: Lote portátil y procesamiento de transmisiónGlobant
 
Programming in python in detail concept .pptx
Programming in python in detail concept .pptxProgramming in python in detail concept .pptx
Programming in python in detail concept .pptxKavitha713564
 

Similar to Obop 210 lecture 2 python documentation (20)

Python Programming Unit1_Aditya College of Engg & Tech
Python Programming Unit1_Aditya College of Engg & TechPython Programming Unit1_Aditya College of Engg & Tech
Python Programming Unit1_Aditya College of Engg & Tech
 
Scale machine learning deployment
Scale machine learning deploymentScale machine learning deployment
Scale machine learning deployment
 
IPT 2.pptx
IPT 2.pptxIPT 2.pptx
IPT 2.pptx
 
Top Five Reasons for Choosing Python Programming
Top Five Reasons for Choosing Python Programming  Top Five Reasons for Choosing Python Programming
Top Five Reasons for Choosing Python Programming
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming Basics
 
Research paper on python by Rj
Research paper on python by RjResearch paper on python by Rj
Research paper on python by Rj
 
Ali alshehri c++_comparison between c++&python
Ali alshehri c++_comparison between c++&pythonAli alshehri c++_comparison between c++&python
Ali alshehri c++_comparison between c++&python
 
Python as Web Development
Python as Web Development Python as Web Development
Python as Web Development
 
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdfDr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
 
Python
PythonPython
Python
 
Python programming ppt.pptx
Python programming ppt.pptxPython programming ppt.pptx
Python programming ppt.pptx
 
Comparison between python and c++
Comparison between python and c++Comparison between python and c++
Comparison between python and c++
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
Introduction to Python GUI development with Delphi for Python - Part 1:   Del...Introduction to Python GUI development with Delphi for Python - Part 1:   Del...
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
 
PYTHON UNIT 1
PYTHON UNIT 1PYTHON UNIT 1
PYTHON UNIT 1
 
What is python
What is pythonWhat is python
What is python
 
Apache Beam: Lote portátil y procesamiento de transmisión
Apache Beam: Lote portátil y procesamiento de transmisiónApache Beam: Lote portátil y procesamiento de transmisión
Apache Beam: Lote portátil y procesamiento de transmisión
 
Programming in python in detail concept .pptx
Programming in python in detail concept .pptxProgramming in python in detail concept .pptx
Programming in python in detail concept .pptx
 

Recently uploaded

Taphonomy and Quality of the Fossil Record
Taphonomy and Quality of the  Fossil RecordTaphonomy and Quality of the  Fossil Record
Taphonomy and Quality of the Fossil RecordSangram Sahoo
 
CYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptxCYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptxCherry
 
GBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of AsepsisGBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of AsepsisAreesha Ahmad
 
Concept of gene and Complementation test.pdf
Concept of gene and Complementation test.pdfConcept of gene and Complementation test.pdf
Concept of gene and Complementation test.pdfCherry
 
Lipids: types, structure and important functions.
Lipids: types, structure and important functions.Lipids: types, structure and important functions.
Lipids: types, structure and important functions.Cherry
 
Terpineol and it's characterization pptx
Terpineol and it's characterization pptxTerpineol and it's characterization pptx
Terpineol and it's characterization pptxMuhammadRazzaq31
 
Pteris : features, anatomy, morphology and lifecycle
Pteris : features, anatomy, morphology and lifecyclePteris : features, anatomy, morphology and lifecycle
Pteris : features, anatomy, morphology and lifecycleCherry
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryAlex Henderson
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCherry
 
GBSN - Microbiology (Unit 5) Concept of isolation
GBSN - Microbiology (Unit 5) Concept of isolationGBSN - Microbiology (Unit 5) Concept of isolation
GBSN - Microbiology (Unit 5) Concept of isolationAreesha Ahmad
 
Cot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNACot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNACherry
 
Understanding Partial Differential Equations: Types and Solution Methods
Understanding Partial Differential Equations: Types and Solution MethodsUnderstanding Partial Differential Equations: Types and Solution Methods
Understanding Partial Differential Equations: Types and Solution Methodsimroshankoirala
 
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIACURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIADr. TATHAGAT KHOBRAGADE
 
ONLINE VOTING SYSTEM SE Project for vote
ONLINE VOTING SYSTEM SE Project for voteONLINE VOTING SYSTEM SE Project for vote
ONLINE VOTING SYSTEM SE Project for voteRaunakRastogi4
 
Efficient spin-up of Earth System Models usingsequence acceleration
Efficient spin-up of Earth System Models usingsequence accelerationEfficient spin-up of Earth System Models usingsequence acceleration
Efficient spin-up of Earth System Models usingsequence accelerationSérgio Sacani
 
Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...Nistarini College, Purulia (W.B) India
 
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.Cherry
 
Role of AI in seed science Predictive modelling and Beyond.pptx
Role of AI in seed science  Predictive modelling and  Beyond.pptxRole of AI in seed science  Predictive modelling and  Beyond.pptx
Role of AI in seed science Predictive modelling and Beyond.pptxArvind Kumar
 
Use of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptxUse of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptxRenuJangid3
 
COMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demeritsCOMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demeritsCherry
 

Recently uploaded (20)

Taphonomy and Quality of the Fossil Record
Taphonomy and Quality of the  Fossil RecordTaphonomy and Quality of the  Fossil Record
Taphonomy and Quality of the Fossil Record
 
CYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptxCYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptx
 
GBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of AsepsisGBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of Asepsis
 
Concept of gene and Complementation test.pdf
Concept of gene and Complementation test.pdfConcept of gene and Complementation test.pdf
Concept of gene and Complementation test.pdf
 
Lipids: types, structure and important functions.
Lipids: types, structure and important functions.Lipids: types, structure and important functions.
Lipids: types, structure and important functions.
 
Terpineol and it's characterization pptx
Terpineol and it's characterization pptxTerpineol and it's characterization pptx
Terpineol and it's characterization pptx
 
Pteris : features, anatomy, morphology and lifecycle
Pteris : features, anatomy, morphology and lifecyclePteris : features, anatomy, morphology and lifecycle
Pteris : features, anatomy, morphology and lifecycle
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptx
 
GBSN - Microbiology (Unit 5) Concept of isolation
GBSN - Microbiology (Unit 5) Concept of isolationGBSN - Microbiology (Unit 5) Concept of isolation
GBSN - Microbiology (Unit 5) Concept of isolation
 
Cot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNACot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNA
 
Understanding Partial Differential Equations: Types and Solution Methods
Understanding Partial Differential Equations: Types and Solution MethodsUnderstanding Partial Differential Equations: Types and Solution Methods
Understanding Partial Differential Equations: Types and Solution Methods
 
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIACURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
 
ONLINE VOTING SYSTEM SE Project for vote
ONLINE VOTING SYSTEM SE Project for voteONLINE VOTING SYSTEM SE Project for vote
ONLINE VOTING SYSTEM SE Project for vote
 
Efficient spin-up of Earth System Models usingsequence acceleration
Efficient spin-up of Earth System Models usingsequence accelerationEfficient spin-up of Earth System Models usingsequence acceleration
Efficient spin-up of Earth System Models usingsequence acceleration
 
Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...
 
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
 
Role of AI in seed science Predictive modelling and Beyond.pptx
Role of AI in seed science  Predictive modelling and  Beyond.pptxRole of AI in seed science  Predictive modelling and  Beyond.pptx
Role of AI in seed science Predictive modelling and Beyond.pptx
 
Use of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptxUse of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptx
 
COMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demeritsCOMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demerits
 

Obop 210 lecture 2 python documentation

  • 1. NDATA SCHOOL OF CLIMATE AND EARTH SCIENCES EARTH SCIENCES DEPARTMENT Geo-Information Science Section Object Oriented Programming: OBOP 210 – Python Prepared By Emmanuel Chinkaka echinkaka@must.ac.mw
  • 2. Introduction to Python ⚫ Python is a high-level programming language ⚫ Open source and community driven ⚫ “Batteries Included” – a standard distribution includes many modules ⚫ Dynamic typed ⚫ Source can be compiled or run just-in-time ⚫ Similar to perl, tcl, ruby
  • 3. Why Python? ⚫ Unlike AML and Avenue, there is a considerable base of developers already using the language ⚫ “Tried and true” language that has been in development since 1991 ⚫ Can interface with the Component Object Model (COM) used by Windows ⚫ Can interface with Open Source GIS toolsets
  • 4. Why not Visual Basic? ⚫ Visual Basic is still the method of configuring and customizing ArcMap ⚫ If you have a button on the toolbar, it’s VB ⚫ Python scripts can be placed in ArcToolbox ⚫ Python can be run from the command line without ArcMap or ArcCatalog being open ⚫ Using just the GIS Engine, lower overhead ⚫ Rapid prototyping, ease of authoring, etc.
  • 5. Python Interfaces ⚫ IDLE – a cross-platform Python development environment ⚫ PythonWin – a Windows only interface to Python ⚫ Python Shell – running 'python' from the Command Line opens this interactive shell ⚫ For the exercises, we'll use IDLE, but you can try them all and pick a favorite
  • 6. IDLE – Development Environment ⚫ IDLE helps you program in Python by: – color-coding your program code – debugging – auto-indent – interactive shell
  • 7. Example Python ⚫ Hello World print “hello world” ⚫ Prints hello world to standard out ⚫ Open IDLE and try it out yourself ⚫ Follow along using IDLE
  • 8. Additional Python Resources ⚫ Python Homepage http://www.python.org/ ⚫ Dive Into Python http://www.diveintopython.org/ ⚫ Learning Python, 3rd Edition http://www.oreilly.com/catalog/9780596513 986/ ⚫ Getting Started Writing Geoprocessing Scripts Available on ESRI's support page