Enviar pesquisa
Carregar
Python for the Mobile and Web
•
0 gostou
•
2,699 visualizações
Derek Kiong
Seguir
Introduction and Why use Python presented at KMD, Myanmar.
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 15
Baixar agora
Baixar para ler offline
Recomendados
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
KrishnaMildain
Python and its Applications
Python and its Applications
Abhijeet Singh
Introduction to python
Introduction to python
Agung Wahyudi
Introduction to python for Beginners
Introduction to python for Beginners
Sujith Kumar
Benefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of python
paradisetechsoftsolutions
Python Programming Language
Python Programming Language
Laxman Puri
Python course syllabus
Python course syllabus
Sugantha T
Seminar report On Python
Seminar report On Python
Shivam Gupta
Recomendados
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
KrishnaMildain
Python and its Applications
Python and its Applications
Abhijeet Singh
Introduction to python
Introduction to python
Agung Wahyudi
Introduction to python for Beginners
Introduction to python for Beginners
Sujith Kumar
Benefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of python
paradisetechsoftsolutions
Python Programming Language
Python Programming Language
Laxman Puri
Python course syllabus
Python course syllabus
Sugantha T
Seminar report On Python
Seminar report On Python
Shivam Gupta
Python - An Introduction
Python - An Introduction
Swarit Wadhe
1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python
SANTOSHJAISWAL52
Python quick guide1
Python quick guide1
Kanchilug
summer training report on python
summer training report on python
Shubham Yadav
Introduction to python
Introduction to python
Learnbay Datascience
Introduction To Python
Introduction To Python
Vanessa Rene
Python presentation by Monu Sharma
Python presentation by Monu Sharma
Mayank Sharma
Python in real world.
Python in real world.
Alph@.M
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
EditorIJAERD
Introduction to python
Introduction to python
ManishJha237
Why Python?
Why Python?
Adam Pah
Presentation on python
Presentation on python
william john
Introduction to python
Introduction to python
Syed Zaid Irshad
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python Tutorial
QA TrainingHub
11 Unit1 Chapter 1 Getting Started With Python
11 Unit1 Chapter 1 Getting Started With Python
Praveen M Jigajinni
Python Summer Internship
Python Summer Internship
Atul Kumar
Python Programming ppt
Python Programming ppt
ismailmrribi
Python presentation
Python presentation
gaganapponix
Python
Python
Learnbay Datascience
CV - Jaspreet Singh
CV - Jaspreet Singh
Jaspreet Singh
ICT, Importance of programming and programming languages
ICT, Importance of programming and programming languages
Ebin Robinson
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
DicodingEvent
Mais conteúdo relacionado
Mais procurados
Python - An Introduction
Python - An Introduction
Swarit Wadhe
1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python
SANTOSHJAISWAL52
Python quick guide1
Python quick guide1
Kanchilug
summer training report on python
summer training report on python
Shubham Yadav
Introduction to python
Introduction to python
Learnbay Datascience
Introduction To Python
Introduction To Python
Vanessa Rene
Python presentation by Monu Sharma
Python presentation by Monu Sharma
Mayank Sharma
Python in real world.
Python in real world.
Alph@.M
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
EditorIJAERD
Introduction to python
Introduction to python
ManishJha237
Why Python?
Why Python?
Adam Pah
Presentation on python
Presentation on python
william john
Introduction to python
Introduction to python
Syed Zaid Irshad
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python Tutorial
QA TrainingHub
11 Unit1 Chapter 1 Getting Started With Python
11 Unit1 Chapter 1 Getting Started With Python
Praveen M Jigajinni
Python Summer Internship
Python Summer Internship
Atul Kumar
Python Programming ppt
Python Programming ppt
ismailmrribi
Python presentation
Python presentation
gaganapponix
Python
Python
Learnbay Datascience
Mais procurados
(19)
Python - An Introduction
Python - An Introduction
1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python
Python quick guide1
Python quick guide1
summer training report on python
summer training report on python
Introduction to python
Introduction to python
Introduction To Python
Introduction To Python
Python presentation by Monu Sharma
Python presentation by Monu Sharma
Python in real world.
Python in real world.
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
Introduction to python
Introduction to python
Why Python?
Why Python?
Presentation on python
Presentation on python
Introduction to python
Introduction to python
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python Tutorial
11 Unit1 Chapter 1 Getting Started With Python
11 Unit1 Chapter 1 Getting Started With Python
Python Summer Internship
Python Summer Internship
Python Programming ppt
Python Programming ppt
Python presentation
Python presentation
Python
Python
Semelhante a Python for the Mobile and Web
CV - Jaspreet Singh
CV - Jaspreet Singh
Jaspreet Singh
ICT, Importance of programming and programming languages
ICT, Importance of programming and programming languages
Ebin Robinson
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
DicodingEvent
Gnana Prasuna B_5.5 years
Gnana Prasuna B_5.5 years
Gnana Bocha
Android Starter Kit
Android Starter Kit
Fajar Ulin Nuha
IITI Hub BTP Report
IITI Hub BTP Report
harshit4003
Windows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's New
Sascha Corti
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
Steve Drucker
Java Swing vs. Android App
Java Swing vs. Android App
Johnny Hujol
Ramesh iOS Profile
Ramesh iOS Profile
Ramesh Sarpuru
Android TCJUG
Android TCJUG
Justin Grammens
Samsung SDS OpeniT - The possibility of Python
Samsung SDS OpeniT - The possibility of Python
Insuk (Chris) Cho
DSC IIITL Flutter Workshop
DSC IIITL Flutter Workshop
DSCIIITLucknow
PraveenResume_4+
PraveenResume_4+
praveen_soft
PHP in a mobile ecosystem
PHP in a mobile ecosystem
Ivo Jansch
python.pptx
python.pptx
rithika858339
Packaging Automation Best Practices for InduSoft Web Studio
Packaging Automation Best Practices for InduSoft Web Studio
AVEVA
What's New with Windows Phone - FoxCon Talk
What's New with Windows Phone - FoxCon Talk
Sam Basu
AnDevCon: Introduction to Darwino
AnDevCon: Introduction to Darwino
Philippe Riand
Drupal as a Framework for Mobile Development
Drupal as a Framework for Mobile Development
Rachel Jaro
Semelhante a Python for the Mobile and Web
(20)
CV - Jaspreet Singh
CV - Jaspreet Singh
ICT, Importance of programming and programming languages
ICT, Importance of programming and programming languages
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Gnana Prasuna B_5.5 years
Gnana Prasuna B_5.5 years
Android Starter Kit
Android Starter Kit
IITI Hub BTP Report
IITI Hub BTP Report
Windows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's New
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
Java Swing vs. Android App
Java Swing vs. Android App
Ramesh iOS Profile
Ramesh iOS Profile
Android TCJUG
Android TCJUG
Samsung SDS OpeniT - The possibility of Python
Samsung SDS OpeniT - The possibility of Python
DSC IIITL Flutter Workshop
DSC IIITL Flutter Workshop
PraveenResume_4+
PraveenResume_4+
PHP in a mobile ecosystem
PHP in a mobile ecosystem
python.pptx
python.pptx
Packaging Automation Best Practices for InduSoft Web Studio
Packaging Automation Best Practices for InduSoft Web Studio
What's New with Windows Phone - FoxCon Talk
What's New with Windows Phone - FoxCon Talk
AnDevCon: Introduction to Darwino
AnDevCon: Introduction to Darwino
Drupal as a Framework for Mobile Development
Drupal as a Framework for Mobile Development
Último
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
itnewsafrica
A Framework for Development in the AI Age
A Framework for Development in the AI Age
Cprime
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Pim van der Noll
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Mark Goldstein
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
LoriGlavin3
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
TopCSSGallery
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
IES VE
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
Farhan Tariq
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
Neo4j
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
LoriGlavin3
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
itnewsafrica
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
panagenda
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
Ravi Sanghani
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
Nicole Novielli
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
fnnc6jmgwh
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
Ingrid Airi González
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
LoriGlavin3
Último
(20)
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
A Framework for Development in the AI Age
A Framework for Development in the AI Age
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Python for the Mobile and Web
1.
© 2013 NUS.
The contents contained in this document may not be reproduced in any form or by any means, without the written permission of ISS, NUS other than for the purpose for which it has been supplied. Software Development Python for Mobile and Web Total: 15 pagesATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Derek Kiong dkiong@nus.edu.sg
2.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 2 What is Python? Small and consistent programming language Supports multiple programming paradigms – object-oriented, imperative and functional Design philosophy emphasizes code readability – has clear syntax has comprehensive standard library latent (dynamic) type system run-time model similar to Scheme/Lisp
3.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 3 Python Features Dynamic typing – does not require declaration Contrast C and Java which have strong typing (implemented through compile-time checks) Dynamic objects with built-in memory management Similar with Java and C# Contrast C and C++ Even function definition is dynamic
4.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 4 Python Language Features int, float, complex, bool, str, bytes list, tuple, set, dict control flow statements, iterator, generator, exception handling functions, parameters class, object, lambda extensive function/class libraries kivy and django are Python modules
5.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 5 Python Sample def factorial(n): if n > 1: return n*factorial(n-1) else: return 1 def list(n): for i in range(n): if i%2 == 0: print "{0} is even".format(i) else: print "{0} is odd".format(i)
6.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 6 Python Sample def factorial2(n): result = 1 for i in range(n,0,-1): result = result*i return result def myadd(a,b): """ Adds a and b using + operator """ return a+b
7.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 7 Android phone/tablet app = androidhelper.Android() app.dialogCreateSpinnerProgress("Coffee", "checking...") app.dialogShow() pg = urlopen("http://www.beans-r-us.biz/prices.html") text = pg.read().decode("utf8") m = re.search(r'>$([.d]+)<',text) if m: price = float(m.group(1)) else: price = 0 app.dialogDismiss() app.vibrate()
8.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 8 Android phone/tablet app.dialogCreateAlert("Current price of coffee beans:") app.dialogSetItems([price]) app.dialogSetPositiveButtonText('OK') app.dialogShow() resp = app.dialogGetResponse().result app.makeToast("Bye!")
9.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 9 Django for the Web Model-View-Controller (MVC) Web framework Object-relational mapping Generated admin pages URL driven site Templating system
10.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 10 Django Model Model specified in Python from django.db import models class Product(models.Model): code = models.CharField(max_length=8) description = models.CharField(max_length=22) price = models.IntegerField() def __str__(self): return self.description class Admin: pass
11.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 11 URL matching import mysite.inventory.views urlpatterns = patterns('', # Examples: # url(r'^$', 'mysite.views.home', name='home'), # url(r'^mysite/', include('mysite.foo.urls')), url(r'^product/?$', mysite.inventory.views.productlisting), url(r'^product/(.+)$', mysite.inventory.views.product), )
12.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 12 Views from mysite.inventory.models import Product def productlisting(request): list = Product.objects.all() t = get_template('productlisting.html') html = t.render(Context({'products':list})) return HttpResponse(html) def product(request, pcode): p = Product.objects.get(code=pcode) t = get_template('product.html') html = t.render(Context({'product':p})) return HttpResponse(html)
13.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 13 productlisting.html template <html><body> <h1>Products</h1> <ul> {% for p in products %} <li> <a href="/product/{{ p.code }}"> {{ p.code }} </a> </li> {% endfor %} </ul> </body></html>
14.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 14 product.html template <html><body> <h1>Product Information</h1> <table border="1" style="solid"> <tr> <th>Code</th> <th>Description</th> <th>Price</th> </tr> <tr> <td> {{ product.code }} </td> <td> {{ product.description }} </td> <td> {{ product.price }} </td> </tr> </table> </body></html>
15.
© 2013 NUS.
All rights reserved.ATA/SA-DIP/TUS/Python Mobile and Web.ppt/v1.0 Python for Mobile and Web 15 Summary Python late binding provides much flexibility http://docs.python.org/2/reference/ QPython in Android http://qpython.com/ Django for the Web https://docs.djangoproject.com/en/1.5/
Baixar agora