SlideShare a Scribd company logo
Python.__init__(Qt)

       Dinesh
Why ANOTHER Language?

  ● Whats there in a language?
- a few keywords and a little bit of grammar


  ● Then why NOT C/C++ ?
  - developing in Python is way faster!- lot less hassle ?- you wouldn't want to use a canon
to kill a mosquito ;)

  ● Even then, why Python!?
- Easy , Extensible, Everywhere!
So what IS Python?

  ● Interpreted Language :) (no more autotools, awk , cmake , qmake madness!)
- But its an INTERPRETED Language!! :S

  ● Dynamically typed language. (no more int, char, float, etc.. ?!)
  ● Its Mixable. (You dont really have to build a class to print hello world)
  ● Indentation (and HENCE, the Beauty of your code!) Counts!

  ● Try using " help() " whenever needed...
Python's keywords

   and      del        from     not          while
   as       elif       global   or          with
   assert     else     if        pass       yield
   break    except     import    print       class
    exec      in       raise     continue    finally
    is        return   def      for          lambda
    try
Python's Core Datatypes
      Object type    Example

                     1234, 4, 999L , 3+ 4j , ..
      Numbers
                     " Hello" , 'There' , ''' :) '''
      Strings
                     [1 , [2 , "Three"], 4]
      Lists
                     {"Food" : 1 , :"Tastes" : "Good":}
      Dictionaries
                     (1 , "Is" , 'one' )
      Tuples
                     myfile = open ("door", 'r' )
      Files
                     Sets , Types, None , Booleans
      Other types
Operators
     Unary + - ~

          **

        * / %

         + -             Arithmetic , Boolean , Relational and Bitwise
                         operators are all left to right associated
        >> <<
                         On the other hand, the assignment operator is
          &
                         right associated
          ^
                         9/3*3=9
           |

 < <= == >= > != <> is

         not

         and
                         *when confused, simply use parenthesis :)
          or
Hello Qt

from PySide.QtGui import *
import sys

#Create a new application for me to work on
myApplication = QApplication ( sys.argv )

#A new push button with a Label!
hello = QPushButton ( " Hi There " )

#Show the button!!
hello.show()

#run my application
myApplicatioin.exec_()

More Related Content

ODP
Hands on Session on Python
ODP
An Intro to Python in 30 minutes
PPTX
Python Workshop - Learn Python the Hard Way
PDF
Python basic
PDF
PyCon 2013 : Scripting to PyPi to GitHub and More
PDF
Why Python (for Statisticians)
PDF
Python in 90 minutes
PDF
Learning go for perl programmers
Hands on Session on Python
An Intro to Python in 30 minutes
Python Workshop - Learn Python the Hard Way
Python basic
PyCon 2013 : Scripting to PyPi to GitHub and More
Why Python (for Statisticians)
Python in 90 minutes
Learning go for perl programmers

What's hot (20)

PDF
Go Lang Tutorial
PDF
Go for Rubyists
PDF
Python idiomatico
PPTX
PDF
Os Goodger
ODP
OpenGurukul : Language : Python
PPTX
Golang iran - tutorial go programming language - Preliminary
ODP
Python internals and how they affect your code - kasra ahmadvand
PPTX
Python programming
PDF
Defer, Panic, Recover
PDF
Let's Go-lang
PDF
An introduction to Python for absolute beginners
PDF
Golang and Eco-System Introduction / Overview
PPTX
Pythonppt28 11-18
PPTX
Basic Python Programming: Part 01 and Part 02
PPTX
FUNDAMENTALS OF PYTHON LANGUAGE
PDF
MP in Clojure
PDF
Happy Go Programming Part 1
PPTX
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
PDF
Free Monads Getting Started
Go Lang Tutorial
Go for Rubyists
Python idiomatico
Os Goodger
OpenGurukul : Language : Python
Golang iran - tutorial go programming language - Preliminary
Python internals and how they affect your code - kasra ahmadvand
Python programming
Defer, Panic, Recover
Let's Go-lang
An introduction to Python for absolute beginners
Golang and Eco-System Introduction / Overview
Pythonppt28 11-18
Basic Python Programming: Part 01 and Part 02
FUNDAMENTALS OF PYTHON LANGUAGE
MP in Clojure
Happy Go Programming Part 1
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
Free Monads Getting Started
Ad

Similar to From 0 to mine sweeper in pyside (20)

PDF
Tutorial on-python-programming
PPT
Python programming
PDF
First Steps in Python Programming
PDF
Introduction To Programming with Python
PPTX
Keep it Stupidly Simple Introduce Python
PPTX
IoT-Week1-Day1-Lab.pptx
PPTX
Programming with python
PPTX
Python Demo.pptx
PPTX
Python unit 2 is added. Has python related programming content
PPTX
Python Demo.pptx
PPT
Python tutorialfeb152012
PPTX
Python4HPC.pptx
PPT
Python
PDF
Sessisgytcfgggggggggggggggggggggggggggggggg
PDF
Introduction of Python
PDF
Q-Step_WS_02102019_Practical_introduction_to_Python.pdf
PPT
Python basics to advanced in on ppt is available
PPTX
python_computer engineering_semester_computer_language.pptx
PPTX
python presntation 2.pptx
PDF
web programming UNIT VIII python by Bhavsingh Maloth
Tutorial on-python-programming
Python programming
First Steps in Python Programming
Introduction To Programming with Python
Keep it Stupidly Simple Introduce Python
IoT-Week1-Day1-Lab.pptx
Programming with python
Python Demo.pptx
Python unit 2 is added. Has python related programming content
Python Demo.pptx
Python tutorialfeb152012
Python4HPC.pptx
Python
Sessisgytcfgggggggggggggggggggggggggggggggg
Introduction of Python
Q-Step_WS_02102019_Practical_introduction_to_Python.pdf
Python basics to advanced in on ppt is available
python_computer engineering_semester_computer_language.pptx
python presntation 2.pptx
web programming UNIT VIII python by Bhavsingh Maloth
Ad

Recently uploaded (20)

PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
August Patch Tuesday
PDF
Approach and Philosophy of On baking technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPTX
Machine Learning_overview_presentation.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mushroom cultivation and it's methods.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
A Presentation on Artificial Intelligence
SOPHOS-XG Firewall Administrator PPT.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
August Patch Tuesday
Approach and Philosophy of On baking technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectroscopy.pptx food analysis technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
TLE Review Electricity (Electricity).pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
A comparative analysis of optical character recognition models for extracting...
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Machine Learning_overview_presentation.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
cloud_computing_Infrastucture_as_cloud_p
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mushroom cultivation and it's methods.pdf
Encapsulation theory and applications.pdf
A Presentation on Artificial Intelligence

From 0 to mine sweeper in pyside

  • 2. Why ANOTHER Language? ● Whats there in a language? - a few keywords and a little bit of grammar ● Then why NOT C/C++ ? - developing in Python is way faster!- lot less hassle ?- you wouldn't want to use a canon to kill a mosquito ;) ● Even then, why Python!? - Easy , Extensible, Everywhere!
  • 3. So what IS Python? ● Interpreted Language :) (no more autotools, awk , cmake , qmake madness!) - But its an INTERPRETED Language!! :S ● Dynamically typed language. (no more int, char, float, etc.. ?!) ● Its Mixable. (You dont really have to build a class to print hello world) ● Indentation (and HENCE, the Beauty of your code!) Counts! ● Try using " help() " whenever needed...
  • 4. Python's keywords and del from not while as elif global or with assert else if pass yield break except import print class exec in raise continue finally is return def for lambda try
  • 5. Python's Core Datatypes Object type Example 1234, 4, 999L , 3+ 4j , .. Numbers " Hello" , 'There' , ''' :) ''' Strings [1 , [2 , "Three"], 4] Lists {"Food" : 1 , :"Tastes" : "Good":} Dictionaries (1 , "Is" , 'one' ) Tuples myfile = open ("door", 'r' ) Files Sets , Types, None , Booleans Other types
  • 6. Operators Unary + - ~ ** * / % + - Arithmetic , Boolean , Relational and Bitwise operators are all left to right associated >> << On the other hand, the assignment operator is & right associated ^ 9/3*3=9 | < <= == >= > != <> is not and *when confused, simply use parenthesis :) or
  • 7. Hello Qt from PySide.QtGui import * import sys #Create a new application for me to work on myApplication = QApplication ( sys.argv ) #A new push button with a Label! hello = QPushButton ( " Hi There " ) #Show the button!! hello.show() #run my application myApplicatioin.exec_()