SlideShare a Scribd company logo
Python per Tutti
          PyPg – Perugia Python Local Users Group




Questa opera è distribuita da PyPg con licenza Creative Commons Attribuzione 3.0 Unported.
Python per etimologisti
Python per etimologisti




   http://www.flickr.com/photos/69er/200248914/
Python per etimologisti




  Pythonesque vs Pythonic
   Pythons vs Pythonistas
Cos'è Python
●   Linguaggio di programmazione:
    ●   Alto livello e General purpose
    ●   Sintassi estremamente pulita
    ●   Multiparadigma
    ●   Tipazione dinamica
    ●   Embeddable ed Estensibile
    ●   Multipiattaforma
    ●   Diverse implementazioni del linguaggio
Python per programmatori Java
●   Linguaggio compilato in bytecode
    ●   In Python compilazione implicita
●   Tutto è un oggetto
●   Libreria standard vasta e potente
●   Garbage collection
●   Introspezione
●   Serializzazione
●   Threads
Python per programmatori C++
●   Multiparadigma
●   Ereditarietà multipla
●   Sovraccarico degli operatori
●   Decine di librerie terze parti per applicazioni
    GUI, rete, database, calcolo distribuito
Python per programmatori C
●   Trust the programmer
●   Don’t prevent the programmer from doing
    what needs to be done.
●   Keep the language small and simple.
●   Provide only one way to do an operation.
●   Make it fast, even if it is not guaranteed to
    be portable. (oops... :-)
       –   Keep the spirit of C, C99 Rationale
Python per programmatori.
●   Tipazione forte ma dinamica
    ●   I nomi non hanno tipo, gli oggetti sì
●   Niente dichiarazioni – solo istruzioni
●   Sintassi minimale
    ●   Indentazione definisce i blocchi
    ●   Niente () se non strettamente necessario
    ●   In generale, poca punteggiatura
●   Tutto è un oggetto di prima classe
    ●   Funzioni, classi, metodi, moduli
●   Il focus è sull'alto livello
The Dream Language
Popolarità
Non necessariamente un linguaggio popolare è anche buono,
ma un linguaggio buono deve essere popolare (P.Graham).




           http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Popolarità
Popolarità
Popolarità
Fattori esterni
●   Documentazione e libri
    ●   Documentazione ufficiale esaustiva ed
        aggiornata
    ●   Mailing lists, gruppi di discussione, canali IRC
        sia internazionali che localizzati
    ●   Decine di Tutorials online
    ●   Decine e decine di ottimi libri e manuali
        sull'argomento
Fattori esterni
●   PSF (Python Software Foundation)
    ●   Detiene e protegge la IP (©, ®) di Python
    ●   Organizza la PyCon accollandosi gli oneri
    ●   Finanzia progetti degni di nota come Jython e
        PyPy
    ●   Partecipa alla Google Summer of Code
Fattori esterni
●   Comunità
    ●   Python Diversity
    ●   Local User Groups
    ●   Conferenze
●   Open Source - Licenza PSFL
    ●   Certificata OSI
    ●   Certificata FSF
    ●   BSD-like, molto liberale
Espressività
●   add x to y giving z
●   z=x+y
●   print 'hello, world'
●   print sum(x for x in range(1000) if x%3==0 or x % 5==0)
●   The Zen of Python: readability counts.
●   Executable pseudo-code
Hackability
●   Clean
    ●   Facile da usare
    ●   Facile da imparare
    ●   Facile da leggere
●   Dirty
Programmi usa e getta
●   Installato di default su tutte le distribuzioni
    Linux e su Mac OSX
●   Shell interattiva
Librerie
●   Batterie incluse!
    ●   Standard Python Library
        –   190+ moduli
             ●   math, sys, os, random, gzip, socket, select, urllib, ftplib, ...
        –   13+ packages
             ●   compile, ctypes, email, xml, ...
    ●   Cheeseshop
        –   17184 packages ad oggi (Ottobre 2011)
Librerie
●   Batterie terze parti
    ●   GUI
        –   PyQt, PyGTK, wxPython
    ●   SQL
        –   SqlAlchemy
    ●   Calcolo scientifico & elaborazione dati
        –   Numpy, SciPy, PIL, openCV, pyVTK, pyCUDA
    ●   Giochi
        –   PyGame, PyGLet, PyOGRE
    ●   Web e rete
        –   Django, Pyramid, Turbogears, Twisted
Efficienza
●   Efficienza != Velocità
●   Profilers (cProfile, profile)
●   Threads
●   Multiprocess
Maturità
●   1991: prima uscita pubblica
●   1992: versione MS-DOS
●   1994: comp.lang.python
●   1996: esce “Programming Python” di M.Lutz
●   1998: Zope
●   2000: versione 2.0
●   2001: RMS says Yes! (licenza gpl-compatibile)
●   Sempre 2001: nasce la PSF
●   2007: prima conferenza italiana, PyCon UNO
●   2008: esce la versione 3.0
Evoluzione agile
●   Python Enhancement Proposal (PEP)
Evoluzione agile
●   Python Enhancement Proposal (PEP)
    ●   Standard Track
        –   PEP100 – Unicode integration
        –   PEP202 – List comprehension
    ●   Informational
        –   PEP8 – Style guidelines
        –   PEP20 – The Zen of Python
    ●   Process
        –   PEP3000 – Python 3k
Python per tutti
●   Ottimo come primo linguaggio
    ●   Ragazzi
        –   Python 4 kids, Snake wrangling for kids, Invent With Python
    ●   Adulti
        –   How to Think Like a Computer Scientist
        –   A Gentle Introduction to Programming Using Python (MIT)
    ●   Nonnetti
        –   Artificial Intelligence: a modern approach, P.Norvig
●   Ottimo come ultimo linguaggio
    ●   Nel senso che non vorrete più cambiarlo
Python per tutti
●   Linux, Windows, OSX, AIX
●   Dispositivi Embedded, Smartphones, Mac,
    PC, HPC
●   CPython, Jython, IronPython, PyPy
antigravity
import
            Massimiliano Pippi
            @maxpippi
            @pyperugia
            http://www.pypg.org

More Related Content

PDF
Corso Python Base: Parte 1 - ForDataScientist 01
ODP
Python nel primo biennio della scuola superiore
ODP
Pyscuola
PDF
Lab psychopy
PDF
Python - Primi passi
PDF
Scenario reclutamento INFN al 17 Novembre 2008
PDF
Py t1 python-intro
PDF
Python base 01-numeristringhe
Corso Python Base: Parte 1 - ForDataScientist 01
Python nel primo biennio della scuola superiore
Pyscuola
Lab psychopy
Python - Primi passi
Scenario reclutamento INFN al 17 Novembre 2008
Py t1 python-intro
Python base 01-numeristringhe

Similar to Python per tutti (20)

PDF
2006 Py01 intro
KEY
Corso Python Deltapromo lezione 1
PDF
Pycrashcourse4.0 pdfjam
PDF
Spyppolare o non spyppolare
KEY
Corso Python Deltapromo - Lezione 2
KEY
Pycrashcourse3.1
KEY
Pycrashcourse
KEY
Pycrashcourse2.0
PDF
Introduzione a Python
PDF
App Engine + Python
KEY
Pycrashcourse3.0
PDF
Le Basi di Python.pdf
PPT
Corso Python Django
PDF
Introduzione a Python e GitHub
PDF
Dynamic Language Programming For The Statically Typed Programmer
PDF
Unbit djangoday 20120419
PDF
Il tutorial di Python
PPTX
Python@Unina - Theory
PDF
T1 introduzione
PDF
2008 python
2006 Py01 intro
Corso Python Deltapromo lezione 1
Pycrashcourse4.0 pdfjam
Spyppolare o non spyppolare
Corso Python Deltapromo - Lezione 2
Pycrashcourse3.1
Pycrashcourse
Pycrashcourse2.0
Introduzione a Python
App Engine + Python
Pycrashcourse3.0
Le Basi di Python.pdf
Corso Python Django
Introduzione a Python e GitHub
Dynamic Language Programming For The Statically Typed Programmer
Unbit djangoday 20120419
Il tutorial di Python
Python@Unina - Theory
T1 introduzione
2008 python
Ad

Python per tutti

  • 1. Python per Tutti PyPg – Perugia Python Local Users Group Questa opera è distribuita da PyPg con licenza Creative Commons Attribuzione 3.0 Unported.
  • 3. Python per etimologisti http://www.flickr.com/photos/69er/200248914/
  • 4. Python per etimologisti Pythonesque vs Pythonic Pythons vs Pythonistas
  • 5. Cos'è Python ● Linguaggio di programmazione: ● Alto livello e General purpose ● Sintassi estremamente pulita ● Multiparadigma ● Tipazione dinamica ● Embeddable ed Estensibile ● Multipiattaforma ● Diverse implementazioni del linguaggio
  • 6. Python per programmatori Java ● Linguaggio compilato in bytecode ● In Python compilazione implicita ● Tutto è un oggetto ● Libreria standard vasta e potente ● Garbage collection ● Introspezione ● Serializzazione ● Threads
  • 7. Python per programmatori C++ ● Multiparadigma ● Ereditarietà multipla ● Sovraccarico degli operatori ● Decine di librerie terze parti per applicazioni GUI, rete, database, calcolo distribuito
  • 8. Python per programmatori C ● Trust the programmer ● Don’t prevent the programmer from doing what needs to be done. ● Keep the language small and simple. ● Provide only one way to do an operation. ● Make it fast, even if it is not guaranteed to be portable. (oops... :-) – Keep the spirit of C, C99 Rationale
  • 9. Python per programmatori. ● Tipazione forte ma dinamica ● I nomi non hanno tipo, gli oggetti sì ● Niente dichiarazioni – solo istruzioni ● Sintassi minimale ● Indentazione definisce i blocchi ● Niente () se non strettamente necessario ● In generale, poca punteggiatura ● Tutto è un oggetto di prima classe ● Funzioni, classi, metodi, moduli ● Il focus è sull'alto livello
  • 11. Popolarità Non necessariamente un linguaggio popolare è anche buono, ma un linguaggio buono deve essere popolare (P.Graham). http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
  • 15. Fattori esterni ● Documentazione e libri ● Documentazione ufficiale esaustiva ed aggiornata ● Mailing lists, gruppi di discussione, canali IRC sia internazionali che localizzati ● Decine di Tutorials online ● Decine e decine di ottimi libri e manuali sull'argomento
  • 16. Fattori esterni ● PSF (Python Software Foundation) ● Detiene e protegge la IP (©, ®) di Python ● Organizza la PyCon accollandosi gli oneri ● Finanzia progetti degni di nota come Jython e PyPy ● Partecipa alla Google Summer of Code
  • 17. Fattori esterni ● Comunità ● Python Diversity ● Local User Groups ● Conferenze ● Open Source - Licenza PSFL ● Certificata OSI ● Certificata FSF ● BSD-like, molto liberale
  • 18. Espressività ● add x to y giving z ● z=x+y ● print 'hello, world' ● print sum(x for x in range(1000) if x%3==0 or x % 5==0) ● The Zen of Python: readability counts. ● Executable pseudo-code
  • 19. Hackability ● Clean ● Facile da usare ● Facile da imparare ● Facile da leggere ● Dirty
  • 20. Programmi usa e getta ● Installato di default su tutte le distribuzioni Linux e su Mac OSX ● Shell interattiva
  • 21. Librerie ● Batterie incluse! ● Standard Python Library – 190+ moduli ● math, sys, os, random, gzip, socket, select, urllib, ftplib, ... – 13+ packages ● compile, ctypes, email, xml, ... ● Cheeseshop – 17184 packages ad oggi (Ottobre 2011)
  • 22. Librerie ● Batterie terze parti ● GUI – PyQt, PyGTK, wxPython ● SQL – SqlAlchemy ● Calcolo scientifico & elaborazione dati – Numpy, SciPy, PIL, openCV, pyVTK, pyCUDA ● Giochi – PyGame, PyGLet, PyOGRE ● Web e rete – Django, Pyramid, Turbogears, Twisted
  • 23. Efficienza ● Efficienza != Velocità ● Profilers (cProfile, profile) ● Threads ● Multiprocess
  • 24. Maturità ● 1991: prima uscita pubblica ● 1992: versione MS-DOS ● 1994: comp.lang.python ● 1996: esce “Programming Python” di M.Lutz ● 1998: Zope ● 2000: versione 2.0 ● 2001: RMS says Yes! (licenza gpl-compatibile) ● Sempre 2001: nasce la PSF ● 2007: prima conferenza italiana, PyCon UNO ● 2008: esce la versione 3.0
  • 25. Evoluzione agile ● Python Enhancement Proposal (PEP)
  • 26. Evoluzione agile ● Python Enhancement Proposal (PEP) ● Standard Track – PEP100 – Unicode integration – PEP202 – List comprehension ● Informational – PEP8 – Style guidelines – PEP20 – The Zen of Python ● Process – PEP3000 – Python 3k
  • 27. Python per tutti ● Ottimo come primo linguaggio ● Ragazzi – Python 4 kids, Snake wrangling for kids, Invent With Python ● Adulti – How to Think Like a Computer Scientist – A Gentle Introduction to Programming Using Python (MIT) ● Nonnetti – Artificial Intelligence: a modern approach, P.Norvig ● Ottimo come ultimo linguaggio ● Nel senso che non vorrete più cambiarlo
  • 28. Python per tutti ● Linux, Windows, OSX, AIX ● Dispositivi Embedded, Smartphones, Mac, PC, HPC ● CPython, Jython, IronPython, PyPy
  • 29. antigravity import Massimiliano Pippi @maxpippi @pyperugia http://www.pypg.org