SlideShare une entreprise Scribd logo
1  sur  77
One line to make it  import able if  __name__ ==  '__main__' : Test()
Desirable Attributes for Programs ,[object Object],[object Object],[object Object],[object Object]
by   Marilyn Davis, Ph.D. [email_address] Marakana Open Source Training www.marakana.com Why Python?
Programmer Friendly ,[object Object],[object Object],[object Object],[object Object]
"""pig.py word [word2 ...] Prints the word(s) in Pig Latin. The rules for forming Pig Latin words are: o If the word begins with a vowel, add "way" to the end of the word. o If the word begins with a consonant, extract  consonants up to the first vowel, move those consonants to the end of the word, and add "ay". """ def   Pigify (word): """Return the word translated to piglatin.""" vowels =  "aeiouyAEIOUY" if  word[0]  in  vowels: return  word +  'way'   # concatonation
o If the word begins with a consonant, extract  consonants up to the first vowel, move those consonants to the end of the word, and add "ay". """ def   Pigify (word): """Return the word translated to piglatin.""" # code blocks are delimited by indentation vowels =  "aeiouyAEIOUY" if  word[0]  in  vowels: return  word +  'way'   # concatonation # loop through a sequence, with index for  i, char  in   enumerate (word): if  char  in  vowels: break return  word[i:] + word[:i] +  'ay'   # slicing
def   Test (): """Test a few words.""" for  word  in   "chocolate" ,  "nuts" ,  "cherry" : # comma suppresses the new line print  Pigify(word),  print   # just prints a new line Test() “”” OUTPUT: $ pig.py ocolatechay utsnay errychay $ """
$   pig.py ocolatechay utsnay errychay $   #!/usr/bin/env python  (Top line in unix)
import  math def   GetCircleAttributes (radius): try : radius = float(radius) except ValueError : return   None circumference = math.pi * 2 * radius area = math.pi * radius * radius return  circumference, area radius =  raw_input ( "radius: " ) answer = GetCircleAttributes(radius) if  answer: circumference, area = answer print   "Circumference =" , circumference print   "Area =" , area else : print   "That wasn't a number!"
A Program File is a  Module  is a  Namespace __main__ The module being run is  “__main__”  ( magic main ).
Each object in the module is another namespace Function Object str Object float Object __main__
Each  import  brings a neighboring namespace into your code. math __main__
Introspection $  python Python 2.6 (r26:66714, Dec 31 2008, 14:19:00)  [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>  dir() ['__builtins__', '__doc__', '__name__', '__package__'] >>>  __name__ '__main__' >>>  a_string = "Hi" >>>  dir() ['__builtins__', '__doc__', '__name__', '__package__', 'a_string']
>>>  dir(a_string) ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_formatter_field_name_split', '_formatter_parser', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
>>>  a_string.swapcase() 'hI' The  dot operator  travels  into a Namespace.
>>>  import math >>>  dir() ['__builtins__', '__doc__', '__name__', '__package__',  'a_string', 'math'] >>>  dir(math) ['__doc__', '__file__', '__name__', '__package__',  'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2',  'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'exp', 'fabs', 'factorial', 'floor', 'fmod',  'frexp', 'fsum', 'hypot', 'isinf', 'isnan', 'ldexp',  'log', 'log10', 'log1p', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']
>>>  import pig >>>  dir() ['__builtins__', '__doc__', '__name__', '__package__', 'a_string', math', 'pig'] >>>  dir(pig) ['Pigify', 'Test', '__builtins__', '__doc__', '__file__', '__name__', '__package__'] >>>
>>>  help(pig) Help on module pig: NAME pig FILE /home/marilyn/python/Why_Python/pig.py DESCRIPTION pig.py word [word2 ...] Prints the word(s) in Pig Latin. The rules for forming Pig Latin words are: o If the word begins with a vowel, add "way"  to the end of the word.
o If the word begins with a consonant, extract  consonants up to the first vowel, move those consonants to the end of the word, and add "ay". FUNCTIONS Pigify(word) Return the word translated to piglatin. Test() Test a few words. >>>  pig.Pigify("jalapenos") 'alapenosjay'
import  pig def  PigLatin(): """Prompts for English, prints pig latin. """ line =  raw_input ( “Tell me something good: “ ) for  word  in  line.split(): print  pig.Pigify(word), print   PigLatin()
Pythonic  Thinking object . attribute Namespaces!  menu.lunch.salad = 'caesar'
Object-Oriented Programming
A class is: ,[object Object],An object is: ,[object Object]
class  Rock: def   SetType ( self , rock_type): self.type = rock_type def   __str__ ( self ): return   "Rock object: "  + self.type  rock_object = Rock() rock_object.SetType( "Pet" ) print  rock_object """ OUTPUT: Rock object: Pet """
>>>  a_list = [3, 8, 1] >>>  a_list[1] = 88 >>>  a_list.pop() 1 >>>  a_list [3, 88] Data Structures (types) Lists
>>>  a_dict = {} >>>  a_dict["Mary"] = "678-8823" >>>  a_dict["Zoe"] = "555-1234" >>>  a_dict[3] = "12" >>>  a_dict {3: '12', 'Mary': '678-8823','Zoe':'555-1234'} >>>  for each_key in a_dict: ...  print each_key, a_dict[each_key] ...  3 12 Mary 678-8823 Zoe 555-1234 >>>  Dictionaries  (hash table, associative array)
More Iterating file_obj =  open ( "ram_tzu" ) for  line  in  file_obj: print  line, """ Ram Tzu knows this: When God wants you to do something, You think it's your idea. """
Swapping this = 1 that = 100 this, that = that, this
def   GoToThePark (name, best_friend= "Jose" ):  print  name,  'and' , best_friend  print   'go to the park' print   'play hide-and-seek' print   'till long after dark' print GoToThePark( 'Charlie' ,  'Jacqueline' ) GoToThePark( 'Judi' ) Default Arguments
Keyword Arguments def   Greet (first, last): print   'Hello' , first, last Greet( 'Rocky' , 'The Squirrel' ) Greet(last= 'Moose' , first= 'Bullwinkle' )
>>>  [(x, x**2) for x in range(1, 10, 2)] [(1, 1), (3, 9), (5, 25), (7, 49), (9, 81)] >>>  reduce(lambda x,y: x + y, range(1,11)) 55 >>>   Functional Programming
Regular expressions  plus r&quot;a string” 'r'   prepended to a string makes a  raw string The backslashes are literal. import re p = re.compile( r”(( ?P<first> +) ?( ?P<middle> ??)) Jones”) m = p.search(&quot;John J. Jones&quot;) >>> m.groups(2) 'John' >>> m.group('first') 'John' Named groups!
String formatting  plus >>>  print &quot;The %s eats some %s before %s time.&quot; % (a_dict[&quot;animal&quot;], a_dict[&quot;food&quot;],  a_dict[&quot;hobby&quot;]) The cat eats some cheese before sleeping time. Dictionary Replacement >>>  print &quot;The %(animal)s eats some %(food)s before %(hobby)s time.&quot; % a_dict The cat eats some cheese before sleeping time.
http://www.iolanguage.com/about/simplicity/
Programmer Friendly ,[object Object],[object Object],[object Object],[object Object]
Desirable Attributes for Programs ,[object Object],[object Object],[object Object],[object Object]
OS Module >>>  import os >>>  os.linesep ''  '' >>>  os.path.join(&quot;some&quot;, &quot;path&quot;) 'some/path'  'somepath' >>>   Linux  Windows
Runs on: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The same source code will run unchanged across all implementations.
Python can integrate with COM, .NET, and CORBA objects. Python is also supported for the Internet Communications Engine (ICE) and many other integration technologies.
SWIG/Boost   C/C++ wrapping tools to bring  C/C++ libraries into the Python interpreter so you can import myCstuff . Jython   For seamless integration of  Java libraries on JVM. IronPython   Microsoft's  implementation for .NET. You can also go the opposite route and embed Python in your own application.
Desirable Attributes for Programs ,[object Object],[object Object],[object Object],[object Object]
Correct ,[object Object]
An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl for a search/string-processing program Lutz Prechelt (prechelt@ira.uka.de) Fakultat fur Informatik Universitat Karlsruhe D-76128 Karlsruhe, Germany March 10, 2000 page.mi.fu-berlin.de/~prechelt/Biblio/jccpprtTR.pdf
 
Efficient ,[object Object],[object Object],[object Object],[object Object]
 
 
http://www.osnews.comstory.php?news_id=5602&page=3 Speed /
http://scutigena. sourceforge .net/
http://shootout.alioth.debian.org/
What about  execution speed ? ,[object Object],[object Object],Steven Ferg, Bureau of Labor Statistics, www.ferg.org
 
Productivity = Lines of code ,[object Object],[object Object],[object Object],A programmer can produce roughly the same number of lines of code per year regardless of the language.  But, one line of code translates to: ,[object Object],[object Object]
Productivity   = Features    implemented  = Fun Note: A day when you  decrease  the number of lines of code while maintaining the same functionality is a  very productive day. ,[object Object],[object Object]
More Instructions/Line of Code ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Python Programmers Have less to do when it's time to modify and enhance the code. Python code is easy to read.
Developer  Reports ,[object Object],[object Object]
[object Object],[object Object]
[object Object],[object Object]
Who is using Python?  What are they doing with it? ,[object Object]
[object Object]
[object Object]
&quot;Python enabled us to create EVE Online, a massive multiplayer game, in record time. The EVE Online server cluster runs over 25,000 simultaneous players in a shared space simulation, most of which is created in Python. The flexibilities of Python have enabled us to quickly improve the game experience based on player feedback,&quot;  ... Hilmar Veigar Petursson of CCP Games.
Python has provided us with a measurable productivity gain that allows us to stay competitive in the online travel space,&quot; said Michael Engelhart, CTO of  EZTrip.com .
“ Python is of tremendous value throughout an  embedded system's lifecycle.” ..Thomas Major, Product Development Manager  Carmanah LED lighting and  solar photovoltaic  systems
[object Object]
[object Object]
[object Object]
&quot;Python is fast enough for our site and allows us to produce maintainable features in record times, with a minimum of developers,&quot;   Cuong Do, Software Architect, YouTube.com.
[object Object],[object Object],[object Object]
[object Object]
[object Object]
[object Object]
[object Object],Rear Admiral Grace Murray Hopper
[object Object]
[object Object]
The point of a programming language is to communicate with other engineers  in a language that also  the computer understands.

Contenu connexe

Tendances

Perl Xpath Lightning Talk
Perl Xpath Lightning TalkPerl Xpath Lightning Talk
Perl Xpath Lightning Talkddn123456
 
Intermediate Perl
Intermediate PerlIntermediate Perl
Intermediate PerlDave Cross
 
Perl 5.10 for People Who Aren't Totally Insane
Perl 5.10 for People Who Aren't Totally InsanePerl 5.10 for People Who Aren't Totally Insane
Perl 5.10 for People Who Aren't Totally InsaneRicardo Signes
 
Perl.Hacks.On.Vim
Perl.Hacks.On.VimPerl.Hacks.On.Vim
Perl.Hacks.On.VimLin Yo-An
 
Beginning Perl
Beginning PerlBeginning Perl
Beginning PerlDave Cross
 
Php Training
Php TrainingPhp Training
Php Trainingadfa
 
Maybe you do not know that ...
Maybe you do not know that ...Maybe you do not know that ...
Maybe you do not know that ...Viktor Turskyi
 
Introduction to Perl Best Practices
Introduction to Perl Best PracticesIntroduction to Perl Best Practices
Introduction to Perl Best PracticesJosé Castro
 
PHP7. Game Changer.
PHP7. Game Changer. PHP7. Game Changer.
PHP7. Game Changer. Haim Michael
 
LPW: Beginners Perl
LPW: Beginners PerlLPW: Beginners Perl
LPW: Beginners PerlDave Cross
 
Introduction to Perl - Day 2
Introduction to Perl - Day 2Introduction to Perl - Day 2
Introduction to Perl - Day 2Dave Cross
 
HTTP and Your Angry Dog
HTTP and Your Angry DogHTTP and Your Angry Dog
HTTP and Your Angry DogRoss Tuck
 
Ods Markup And Tagsets: A Tutorial
Ods Markup And Tagsets: A TutorialOds Markup And Tagsets: A Tutorial
Ods Markup And Tagsets: A Tutorialsimienc
 
using python module: doctest
using python module: doctestusing python module: doctest
using python module: doctestmitnk
 
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09Ilya Grigorik
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisIan Macali
 

Tendances (20)

Perl Xpath Lightning Talk
Perl Xpath Lightning TalkPerl Xpath Lightning Talk
Perl Xpath Lightning Talk
 
Intermediate Perl
Intermediate PerlIntermediate Perl
Intermediate Perl
 
Perl 5.10 for People Who Aren't Totally Insane
Perl 5.10 for People Who Aren't Totally InsanePerl 5.10 for People Who Aren't Totally Insane
Perl 5.10 for People Who Aren't Totally Insane
 
Perl.Hacks.On.Vim
Perl.Hacks.On.VimPerl.Hacks.On.Vim
Perl.Hacks.On.Vim
 
Beginning Perl
Beginning PerlBeginning Perl
Beginning Perl
 
Php Training
Php TrainingPhp Training
Php Training
 
Maybe you do not know that ...
Maybe you do not know that ...Maybe you do not know that ...
Maybe you do not know that ...
 
Introduction to Perl Best Practices
Introduction to Perl Best PracticesIntroduction to Perl Best Practices
Introduction to Perl Best Practices
 
PHP7. Game Changer.
PHP7. Game Changer. PHP7. Game Changer.
PHP7. Game Changer.
 
LPW: Beginners Perl
LPW: Beginners PerlLPW: Beginners Perl
LPW: Beginners Perl
 
Introduction to Perl - Day 2
Introduction to Perl - Day 2Introduction to Perl - Day 2
Introduction to Perl - Day 2
 
HTTP and Your Angry Dog
HTTP and Your Angry DogHTTP and Your Angry Dog
HTTP and Your Angry Dog
 
Cleancode
CleancodeCleancode
Cleancode
 
Ods Markup And Tagsets: A Tutorial
Ods Markup And Tagsets: A TutorialOds Markup And Tagsets: A Tutorial
Ods Markup And Tagsets: A Tutorial
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 
using python module: doctest
using python module: doctestusing python module: doctest
using python module: doctest
 
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
 
Hom Class
Hom ClassHom Class
Hom Class
 
Hom Class
Hom ClassHom Class
Hom Class
 

En vedette

Commit2015 kharchenko - python generators - ext
Commit2015   kharchenko - python generators - extCommit2015   kharchenko - python generators - ext
Commit2015 kharchenko - python generators - extMaxym Kharchenko
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-pptSrijib Roy
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentBenny Skogberg
 
My presentation on Android in my college
My presentation on Android in my collegeMy presentation on Android in my college
My presentation on Android in my collegeSneha Lata
 
Teresa nuevo
Teresa nuevoTeresa nuevo
Teresa nuevoserveduc
 
WEB Taikomųjų Programų Kūrimas
WEB Taikomųjų Programų KūrimasWEB Taikomųjų Programų Kūrimas
WEB Taikomųjų Programų KūrimasTomas Dabasinskas
 
Facebook Places Mindshare
Facebook Places MindshareFacebook Places Mindshare
Facebook Places MindshareRubén López
 
The Art of Game Design
The Art of Game DesignThe Art of Game Design
The Art of Game Designirvine1321
 
【国立大学法人東京農工大学】平成18年環境報告書
【国立大学法人東京農工大学】平成18年環境報告書【国立大学法人東京農工大学】平成18年環境報告書
【国立大学法人東京農工大学】平成18年環境報告書env62
 
Passive voice-1227818763138900-9
Passive voice-1227818763138900-9Passive voice-1227818763138900-9
Passive voice-1227818763138900-9Sonia
 

En vedette (20)

Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
Commit2015 kharchenko - python generators - ext
Commit2015   kharchenko - python generators - extCommit2015   kharchenko - python generators - ext
Commit2015 kharchenko - python generators - ext
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-ppt
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Android ppt
Android pptAndroid ppt
Android ppt
 
My presentation on Android in my college
My presentation on Android in my collegeMy presentation on Android in my college
My presentation on Android in my college
 
Android seminar ppt
Android seminar pptAndroid seminar ppt
Android seminar ppt
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Teresa nuevo
Teresa nuevoTeresa nuevo
Teresa nuevo
 
WEB Taikomųjų Programų Kūrimas
WEB Taikomųjų Programų KūrimasWEB Taikomųjų Programų Kūrimas
WEB Taikomųjų Programų Kūrimas
 
Technology and the Travel Agents
Technology and the Travel Agents Technology and the Travel Agents
Technology and the Travel Agents
 
The Leaderful Fieldbook
The Leaderful FieldbookThe Leaderful Fieldbook
The Leaderful Fieldbook
 
Facebook Places Mindshare
Facebook Places MindshareFacebook Places Mindshare
Facebook Places Mindshare
 
Op.49nº2
Op.49nº2Op.49nº2
Op.49nº2
 
The Art of Game Design
The Art of Game DesignThe Art of Game Design
The Art of Game Design
 
【国立大学法人東京農工大学】平成18年環境報告書
【国立大学法人東京農工大学】平成18年環境報告書【国立大学法人東京農工大学】平成18年環境報告書
【国立大学法人東京農工大学】平成18年環境報告書
 
Your Data, Your Interface
Your Data, Your InterfaceYour Data, Your Interface
Your Data, Your Interface
 
Corbans 2010
Corbans 2010Corbans 2010
Corbans 2010
 
Passive voice-1227818763138900-9
Passive voice-1227818763138900-9Passive voice-1227818763138900-9
Passive voice-1227818763138900-9
 

Similaire à Why Python by Marilyn Davis, Marakana

Intro python
Intro pythonIntro python
Intro pythonkamzilla
 
Exploiting Php With Php
Exploiting Php With PhpExploiting Php With Php
Exploiting Php With PhpJeremy Coates
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1Dave Cross
 
The bones of a nice Python script
The bones of a nice Python scriptThe bones of a nice Python script
The bones of a nice Python scriptsaniac
 
Python - Getting to the Essence - Points.com - Dave Park
Python - Getting to the Essence - Points.com - Dave ParkPython - Getting to the Essence - Points.com - Dave Park
Python - Getting to the Essence - Points.com - Dave Parkpointstechgeeks
 
Python quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung FuPython quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung Fuclimatewarrior
 
03 Php Array String Functions
03 Php Array String Functions03 Php Array String Functions
03 Php Array String FunctionsGeshan Manandhar
 
Impacta - Show Day de Rails
Impacta - Show Day de RailsImpacta - Show Day de Rails
Impacta - Show Day de RailsFabio Akita
 
Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Coursemussawir20
 
Php Loop
Php LoopPhp Loop
Php Looplotlot
 
Key Value Storage Systems ... and Beyond ... with Python
Key Value Storage Systems ... and Beyond ... with PythonKey Value Storage Systems ... and Beyond ... with Python
Key Value Storage Systems ... and Beyond ... with PythonIan Lewis
 
PHP Presentation
PHP PresentationPHP Presentation
PHP PresentationAnkush Jain
 

Similaire à Why Python by Marilyn Davis, Marakana (20)

Modern Perl
Modern PerlModern Perl
Modern Perl
 
Intro python
Intro pythonIntro python
Intro python
 
Exploiting Php With Php
Exploiting Php With PhpExploiting Php With Php
Exploiting Php With Php
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1
 
The bones of a nice Python script
The bones of a nice Python scriptThe bones of a nice Python script
The bones of a nice Python script
 
Python - Getting to the Essence - Points.com - Dave Park
Python - Getting to the Essence - Points.com - Dave ParkPython - Getting to the Essence - Points.com - Dave Park
Python - Getting to the Essence - Points.com - Dave Park
 
Simple perl scripts
Simple perl scriptsSimple perl scripts
Simple perl scripts
 
Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
 
Python quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung FuPython quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung Fu
 
Php 3 1
Php 3 1Php 3 1
Php 3 1
 
03 Php Array String Functions
03 Php Array String Functions03 Php Array String Functions
03 Php Array String Functions
 
Perl Introduction
Perl IntroductionPerl Introduction
Perl Introduction
 
Impacta - Show Day de Rails
Impacta - Show Day de RailsImpacta - Show Day de Rails
Impacta - Show Day de Rails
 
Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Course
 
Php 2
Php 2Php 2
Php 2
 
Php Loop
Php LoopPhp Loop
Php Loop
 
Key Value Storage Systems ... and Beyond ... with Python
Key Value Storage Systems ... and Beyond ... with PythonKey Value Storage Systems ... and Beyond ... with Python
Key Value Storage Systems ... and Beyond ... with Python
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Php
PhpPhp
Php
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 

Plus de Marko Gargenta

LTE: Building New Killer Apps
LTE: Building New Killer AppsLTE: Building New Killer Apps
LTE: Building New Killer AppsMarko Gargenta
 
Android Beyond The Phone
Android Beyond The PhoneAndroid Beyond The Phone
Android Beyond The PhoneMarko Gargenta
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java DevelopersMarko Gargenta
 
Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Marko Gargenta
 
Android: A 9,000-foot Overview
Android: A 9,000-foot OverviewAndroid: A 9,000-foot Overview
Android: A 9,000-foot OverviewMarko Gargenta
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developersMarko Gargenta
 
Marakana Android Internals
Marakana Android InternalsMarakana Android Internals
Marakana Android InternalsMarko Gargenta
 
Android For Managers Slides
Android For Managers SlidesAndroid For Managers Slides
Android For Managers SlidesMarko Gargenta
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardMarko Gargenta
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardMarko Gargenta
 

Plus de Marko Gargenta (16)

Open Android
Open AndroidOpen Android
Open Android
 
LTE: Building New Killer Apps
LTE: Building New Killer AppsLTE: Building New Killer Apps
LTE: Building New Killer Apps
 
Java Champion Wanted
Java Champion WantedJava Champion Wanted
Java Champion Wanted
 
Android Beyond The Phone
Android Beyond The PhoneAndroid Beyond The Phone
Android Beyond The Phone
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java Developers
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010
 
Android: A 9,000-foot Overview
Android: A 9,000-foot OverviewAndroid: A 9,000-foot Overview
Android: A 9,000-foot Overview
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developers
 
Marakana Android Internals
Marakana Android InternalsMarakana Android Internals
Marakana Android Internals
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Scrum Overview
Scrum OverviewScrum Overview
Scrum Overview
 
Android For Managers Slides
Android For Managers SlidesAndroid For Managers Slides
Android For Managers Slides
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So Hard
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So Hard
 

Dernier

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Dernier (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Why Python by Marilyn Davis, Marakana

  • 1. One line to make it import able if __name__ == '__main__' : Test()
  • 2.
  • 3. by Marilyn Davis, Ph.D. [email_address] Marakana Open Source Training www.marakana.com Why Python?
  • 4.
  • 5. &quot;&quot;&quot;pig.py word [word2 ...] Prints the word(s) in Pig Latin. The rules for forming Pig Latin words are: o If the word begins with a vowel, add &quot;way&quot; to the end of the word. o If the word begins with a consonant, extract consonants up to the first vowel, move those consonants to the end of the word, and add &quot;ay&quot;. &quot;&quot;&quot; def Pigify (word): &quot;&quot;&quot;Return the word translated to piglatin.&quot;&quot;&quot; vowels = &quot;aeiouyAEIOUY&quot; if word[0] in vowels: return word + 'way' # concatonation
  • 6. o If the word begins with a consonant, extract consonants up to the first vowel, move those consonants to the end of the word, and add &quot;ay&quot;. &quot;&quot;&quot; def Pigify (word): &quot;&quot;&quot;Return the word translated to piglatin.&quot;&quot;&quot; # code blocks are delimited by indentation vowels = &quot;aeiouyAEIOUY&quot; if word[0] in vowels: return word + 'way' # concatonation # loop through a sequence, with index for i, char in enumerate (word): if char in vowels: break return word[i:] + word[:i] + 'ay' # slicing
  • 7. def Test (): &quot;&quot;&quot;Test a few words.&quot;&quot;&quot; for word in &quot;chocolate&quot; , &quot;nuts&quot; , &quot;cherry&quot; : # comma suppresses the new line print Pigify(word), print # just prints a new line Test() “”” OUTPUT: $ pig.py ocolatechay utsnay errychay $ &quot;&quot;&quot;
  • 8. $ pig.py ocolatechay utsnay errychay $ #!/usr/bin/env python (Top line in unix)
  • 9. import math def GetCircleAttributes (radius): try : radius = float(radius) except ValueError : return None circumference = math.pi * 2 * radius area = math.pi * radius * radius return circumference, area radius = raw_input ( &quot;radius: &quot; ) answer = GetCircleAttributes(radius) if answer: circumference, area = answer print &quot;Circumference =&quot; , circumference print &quot;Area =&quot; , area else : print &quot;That wasn't a number!&quot;
  • 10. A Program File is a Module is a Namespace __main__ The module being run is “__main__” ( magic main ).
  • 11. Each object in the module is another namespace Function Object str Object float Object __main__
  • 12. Each import brings a neighboring namespace into your code. math __main__
  • 13. Introspection $ python Python 2.6 (r26:66714, Dec 31 2008, 14:19:00) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. >>> dir() ['__builtins__', '__doc__', '__name__', '__package__'] >>> __name__ '__main__' >>> a_string = &quot;Hi&quot; >>> dir() ['__builtins__', '__doc__', '__name__', '__package__', 'a_string']
  • 14. >>> dir(a_string) ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_formatter_field_name_split', '_formatter_parser', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
  • 15. >>> a_string.swapcase() 'hI' The dot operator travels into a Namespace.
  • 16. >>> import math >>> dir() ['__builtins__', '__doc__', '__name__', '__package__', 'a_string', 'math'] >>> dir(math) ['__doc__', '__file__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'exp', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'hypot', 'isinf', 'isnan', 'ldexp', 'log', 'log10', 'log1p', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']
  • 17. >>> import pig >>> dir() ['__builtins__', '__doc__', '__name__', '__package__', 'a_string', math', 'pig'] >>> dir(pig) ['Pigify', 'Test', '__builtins__', '__doc__', '__file__', '__name__', '__package__'] >>>
  • 18. >>> help(pig) Help on module pig: NAME pig FILE /home/marilyn/python/Why_Python/pig.py DESCRIPTION pig.py word [word2 ...] Prints the word(s) in Pig Latin. The rules for forming Pig Latin words are: o If the word begins with a vowel, add &quot;way&quot; to the end of the word.
  • 19. o If the word begins with a consonant, extract consonants up to the first vowel, move those consonants to the end of the word, and add &quot;ay&quot;. FUNCTIONS Pigify(word) Return the word translated to piglatin. Test() Test a few words. >>> pig.Pigify(&quot;jalapenos&quot;) 'alapenosjay'
  • 20. import pig def PigLatin(): &quot;&quot;&quot;Prompts for English, prints pig latin. &quot;&quot;&quot; line = raw_input ( “Tell me something good: “ ) for word in line.split(): print pig.Pigify(word), print PigLatin()
  • 21. Pythonic Thinking object . attribute Namespaces! menu.lunch.salad = 'caesar'
  • 23.
  • 24. class Rock: def SetType ( self , rock_type): self.type = rock_type def __str__ ( self ): return &quot;Rock object: &quot; + self.type rock_object = Rock() rock_object.SetType( &quot;Pet&quot; ) print rock_object &quot;&quot;&quot; OUTPUT: Rock object: Pet &quot;&quot;&quot;
  • 25. >>> a_list = [3, 8, 1] >>> a_list[1] = 88 >>> a_list.pop() 1 >>> a_list [3, 88] Data Structures (types) Lists
  • 26. >>> a_dict = {} >>> a_dict[&quot;Mary&quot;] = &quot;678-8823&quot; >>> a_dict[&quot;Zoe&quot;] = &quot;555-1234&quot; >>> a_dict[3] = &quot;12&quot; >>> a_dict {3: '12', 'Mary': '678-8823','Zoe':'555-1234'} >>> for each_key in a_dict: ... print each_key, a_dict[each_key] ... 3 12 Mary 678-8823 Zoe 555-1234 >>> Dictionaries (hash table, associative array)
  • 27. More Iterating file_obj = open ( &quot;ram_tzu&quot; ) for line in file_obj: print line, &quot;&quot;&quot; Ram Tzu knows this: When God wants you to do something, You think it's your idea. &quot;&quot;&quot;
  • 28. Swapping this = 1 that = 100 this, that = that, this
  • 29. def GoToThePark (name, best_friend= &quot;Jose&quot; ): print name, 'and' , best_friend print 'go to the park' print 'play hide-and-seek' print 'till long after dark' print GoToThePark( 'Charlie' , 'Jacqueline' ) GoToThePark( 'Judi' ) Default Arguments
  • 30. Keyword Arguments def Greet (first, last): print 'Hello' , first, last Greet( 'Rocky' , 'The Squirrel' ) Greet(last= 'Moose' , first= 'Bullwinkle' )
  • 31. >>> [(x, x**2) for x in range(1, 10, 2)] [(1, 1), (3, 9), (5, 25), (7, 49), (9, 81)] >>> reduce(lambda x,y: x + y, range(1,11)) 55 >>> Functional Programming
  • 32. Regular expressions plus r&quot;a string” 'r' prepended to a string makes a raw string The backslashes are literal. import re p = re.compile( r”(( ?P<first> +) ?( ?P<middle> ??)) Jones”) m = p.search(&quot;John J. Jones&quot;) >>> m.groups(2) 'John' >>> m.group('first') 'John' Named groups!
  • 33. String formatting plus >>> print &quot;The %s eats some %s before %s time.&quot; % (a_dict[&quot;animal&quot;], a_dict[&quot;food&quot;], a_dict[&quot;hobby&quot;]) The cat eats some cheese before sleeping time. Dictionary Replacement >>> print &quot;The %(animal)s eats some %(food)s before %(hobby)s time.&quot; % a_dict The cat eats some cheese before sleeping time.
  • 35.
  • 36.
  • 37. OS Module >>> import os >>> os.linesep '' '' >>> os.path.join(&quot;some&quot;, &quot;path&quot;) 'some/path' 'somepath' >>> Linux Windows
  • 38.
  • 39. Python can integrate with COM, .NET, and CORBA objects. Python is also supported for the Internet Communications Engine (ICE) and many other integration technologies.
  • 40. SWIG/Boost C/C++ wrapping tools to bring C/C++ libraries into the Python interpreter so you can import myCstuff . Jython For seamless integration of Java libraries on JVM. IronPython Microsoft's implementation for .NET. You can also go the opposite route and embed Python in your own application.
  • 41.
  • 42.
  • 43. An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl for a search/string-processing program Lutz Prechelt (prechelt@ira.uka.de) Fakultat fur Informatik Universitat Karlsruhe D-76128 Karlsruhe, Germany March 10, 2000 page.mi.fu-berlin.de/~prechelt/Biblio/jccpprtTR.pdf
  • 44.  
  • 45.
  • 46.  
  • 47.  
  • 51.
  • 52.  
  • 53.
  • 54.
  • 55.
  • 56. Python Programmers Have less to do when it's time to modify and enhance the code. Python code is easy to read.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63. &quot;Python enabled us to create EVE Online, a massive multiplayer game, in record time. The EVE Online server cluster runs over 25,000 simultaneous players in a shared space simulation, most of which is created in Python. The flexibilities of Python have enabled us to quickly improve the game experience based on player feedback,&quot; ... Hilmar Veigar Petursson of CCP Games.
  • 64. Python has provided us with a measurable productivity gain that allows us to stay competitive in the online travel space,&quot; said Michael Engelhart, CTO of EZTrip.com .
  • 65. “ Python is of tremendous value throughout an embedded system's lifecycle.” ..Thomas Major, Product Development Manager Carmanah LED lighting and solar photovoltaic systems
  • 66.
  • 67.
  • 68.
  • 69. &quot;Python is fast enough for our site and allows us to produce maintainable features in record times, with a minimum of developers,&quot; Cuong Do, Software Architect, YouTube.com.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77. The point of a programming language is to communicate with other engineers in a language that also the computer understands.