SlideShare uma empresa Scribd logo
1 de 22
The .NET developer’s introduction to IronPython Dror Helper
About.Me Software developer (7 years) .NET developer (mostly C#) Language geek Blogger – http://blog.drorhelper.com
Agenda Some background Python basics What is IronPython Why should you care
Python programming language Created in 1990 by Guido van Rossum General purpose high-level programming language Named after Monty Python
Python flavors
What about IronPython?
The Python language
Multi Paradigm
Dynamic but type safe The interpreter keeps track of all variables types Cannot do anything that's incompatible with the type of data you're working with Types can change Variable is simply a value bound to a name
Data Types
Indention instead of brackets foriinrange(100):  ifi % 3 == 0: ifi % 5 == 0: print“FizzBuzz” else: print“Fizz” elifi % 5 == 0: print“Buzz“ else: printi
Python focus Duck Typing List comprehension
Duck Typing class Duck:  def quack(self):  print("Quaaaaaack!")  class Person:  def quack(self):  print("The person imitates a duck.")  defin_the_forest(duck):  duck.quack()  def game():  donald = Duck()  	john = Person()  in_the_forest(donald)  in_the_forest(john)  game()
List Comprehension What would be the values of listB? listA = [j for i in range(2, 8) for j in range(i*2, 50, i)]listB = [x for x in range(2, 50) if x not in listA] [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
What about IronPython?
IronPython Goals True Python Implementation Seamless integration with .NET
IronPython is: Open source Supports both .NET & Mono All CLR types are available Can call .NET code
IronPython IDEs VS2010 + IronPython extension #Develop Wing Eclipse + PyDev For more details see: http://www.voidspace.org.uk/ironpython/tools-and-ides.shtml
The interactive shell Run code on the fly Run .NET code on the fly >>> print "Hello, world" Hello, world >>> x = 12**2 >>> x/2 72 >>> # this is a comment
IronPython in the real world Use IronPython as part of your .NET applications WPF PowerShell ASP.NET Spark Silverlight Robotics Studio XNA Scripting engine
Where to start Download IronPython and give it a try TryPython - http://ironpython.net/try/ Read a book Add IronPython to your utility belt
Resources IronPython - http://ironpython.net/ IronPython on Codeplexhttp://ironpython.codeplex.com/ Books: Dive into Python - http://diveintopython.org/ IronPython in Action - http://www.ironpythoninaction.com/ Blogs: Voidspace techie blog: http://www.voidspace.org.uk/python/weblog/index.shtml Getting started with IronPython - http://blogs.microsoft.co.il/blogs/dhelper/archive/2009/05/01/beginning-ironpython-development-part-1-where-to-start.aspx Integration: ASP.NET: http://aspnet.codeplex.com/wikipage?referringTitle=Home&title=Dynamic%20Language%20Support SilverLight: http://www.voidspace.org.uk/ironpython/silverlight/index.shtml Spark:  http://sparkviewengine.com/documentation/ironpython

Mais conteúdo relacionado

Mais procurados

Mais procurados (13)

Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
 
Python
PythonPython
Python
 
The str/bytes nightmare before python2 EOL
The str/bytes nightmare before python2 EOLThe str/bytes nightmare before python2 EOL
The str/bytes nightmare before python2 EOL
 
Introduction to python 3
Introduction to python 3Introduction to python 3
Introduction to python 3
 
Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for Engineers
 
Introduction to python 3 2nd round
Introduction to python 3   2nd roundIntroduction to python 3   2nd round
Introduction to python 3 2nd round
 
Podcasting 101
Podcasting 101Podcasting 101
Podcasting 101
 
PYTHON PROGRAMMING FOR HACKERS. PART 1 – GETTING STARTED
PYTHON PROGRAMMING FOR HACKERS. PART 1 – GETTING STARTEDPYTHON PROGRAMMING FOR HACKERS. PART 1 – GETTING STARTED
PYTHON PROGRAMMING FOR HACKERS. PART 1 – GETTING STARTED
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Beginning Python Programmers: Here's Where to Find Help!
Beginning Python Programmers: Here's Where to Find Help!Beginning Python Programmers: Here's Where to Find Help!
Beginning Python Programmers: Here's Where to Find Help!
 
Writing the docs
Writing the docsWriting the docs
Writing the docs
 
Python course syllabus
Python course syllabusPython course syllabus
Python course syllabus
 

Destaque (8)

SyPy IronPython
SyPy IronPythonSyPy IronPython
SyPy IronPython
 
Jython
JythonJython
Jython
 
Communication between Java and Python
Communication between Java and PythonCommunication between Java and Python
Communication between Java and Python
 
Network programming in python..
Network programming in python..Network programming in python..
Network programming in python..
 
Python Network Programming
Python Network ProgrammingPython Network Programming
Python Network Programming
 
Mixing Python and Java
Mixing Python and JavaMixing Python and Java
Mixing Python and Java
 
Jython: Integrating Python and Java
Jython: Integrating Python and JavaJython: Integrating Python and Java
Jython: Integrating Python and Java
 
Mastering Python 3 I/O
Mastering Python 3 I/OMastering Python 3 I/O
Mastering Python 3 I/O
 

Semelhante a The .NET developer's introduction to IronPython

Semelhante a The .NET developer's introduction to IronPython (20)

Python Tutorials.pptx
Python Tutorials.pptxPython Tutorials.pptx
Python Tutorials.pptx
 
Ctrc python
Ctrc pythonCtrc python
Ctrc python
 
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
 
Charming python
Charming pythonCharming python
Charming python
 
Open Source .NET
Open Source .NETOpen Source .NET
Open Source .NET
 
Web Programming UNIT VIII notes
Web Programming UNIT VIII notesWeb Programming UNIT VIII notes
Web Programming UNIT VIII notes
 
What is Python? (Silicon Valley CodeCamp 2014)
What is Python? (Silicon Valley CodeCamp 2014)What is Python? (Silicon Valley CodeCamp 2014)
What is Python? (Silicon Valley CodeCamp 2014)
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Python
PythonPython
Python
 
Introduction to python.pptx
Introduction to python.pptxIntroduction to python.pptx
Introduction to python.pptx
 
Code in python
Code in pythonCode in python
Code in python
 
Python basics
Python basicsPython basics
Python basics
 
Python Tutorial
Python TutorialPython Tutorial
Python Tutorial
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
 
Python: an introduction for PHP webdevelopers
Python: an introduction for PHP webdevelopersPython: an introduction for PHP webdevelopers
Python: an introduction for PHP webdevelopers
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
 
Day 1 Introduction to Python.pptx
Day 1 Introduction to Python.pptxDay 1 Introduction to Python.pptx
Day 1 Introduction to Python.pptx
 
Apples and Oranges-- Introductory Comparison between PHP and Python
Apples and Oranges-- Introductory Comparison between PHP and PythonApples and Oranges-- Introductory Comparison between PHP and Python
Apples and Oranges-- Introductory Comparison between PHP and Python
 

Mais de Dror Helper

Mais de Dror Helper (20)

Unit testing patterns for concurrent code
Unit testing patterns for concurrent codeUnit testing patterns for concurrent code
Unit testing patterns for concurrent code
 
The secret unit testing tools no one ever told you about
The secret unit testing tools no one ever told you aboutThe secret unit testing tools no one ever told you about
The secret unit testing tools no one ever told you about
 
Debugging with visual studio beyond 'F5'
Debugging with visual studio beyond 'F5'Debugging with visual studio beyond 'F5'
Debugging with visual studio beyond 'F5'
 
From clever code to better code
From clever code to better codeFrom clever code to better code
From clever code to better code
 
From clever code to better code
From clever code to better codeFrom clever code to better code
From clever code to better code
 
A software developer guide to working with aws
A software developer guide to working with awsA software developer guide to working with aws
A software developer guide to working with aws
 
The secret unit testing tools no one has ever told you about
The secret unit testing tools no one has ever told you aboutThe secret unit testing tools no one has ever told you about
The secret unit testing tools no one has ever told you about
 
The role of the architect in agile
The role of the architect in agileThe role of the architect in agile
The role of the architect in agile
 
Harnessing the power of aws using dot net core
Harnessing the power of aws using dot net coreHarnessing the power of aws using dot net core
Harnessing the power of aws using dot net core
 
Developing multi-platform microservices using .NET core
 Developing multi-platform microservices using .NET core Developing multi-platform microservices using .NET core
Developing multi-platform microservices using .NET core
 
Harnessing the power of aws using dot net
Harnessing the power of aws using dot netHarnessing the power of aws using dot net
Harnessing the power of aws using dot net
 
Secret unit testing tools no one ever told you about
Secret unit testing tools no one ever told you aboutSecret unit testing tools no one ever told you about
Secret unit testing tools no one ever told you about
 
C++ Unit testing - the good, the bad & the ugly
C++ Unit testing - the good, the bad & the uglyC++ Unit testing - the good, the bad & the ugly
C++ Unit testing - the good, the bad & the ugly
 
Working with c++ legacy code
Working with c++ legacy codeWorking with c++ legacy code
Working with c++ legacy code
 
Visual Studio tricks every dot net developer should know
Visual Studio tricks every dot net developer should knowVisual Studio tricks every dot net developer should know
Visual Studio tricks every dot net developer should know
 
Secret unit testing tools
Secret unit testing toolsSecret unit testing tools
Secret unit testing tools
 
Electronics 101 for software developers
Electronics 101 for software developersElectronics 101 for software developers
Electronics 101 for software developers
 
Navigating the xDD Alphabet Soup
Navigating the xDD Alphabet SoupNavigating the xDD Alphabet Soup
Navigating the xDD Alphabet Soup
 
Building unit tests correctly
Building unit tests correctlyBuilding unit tests correctly
Building unit tests correctly
 
Who’s afraid of WinDbg
Who’s afraid of WinDbgWho’s afraid of WinDbg
Who’s afraid of WinDbg
 

Último

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
vu2urc
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

The .NET developer's introduction to IronPython

  • 1. The .NET developer’s introduction to IronPython Dror Helper
  • 2. About.Me Software developer (7 years) .NET developer (mostly C#) Language geek Blogger – http://blog.drorhelper.com
  • 3. Agenda Some background Python basics What is IronPython Why should you care
  • 4. Python programming language Created in 1990 by Guido van Rossum General purpose high-level programming language Named after Monty Python
  • 9. Dynamic but type safe The interpreter keeps track of all variables types Cannot do anything that's incompatible with the type of data you're working with Types can change Variable is simply a value bound to a name
  • 11. Indention instead of brackets foriinrange(100): ifi % 3 == 0: ifi % 5 == 0: print“FizzBuzz” else: print“Fizz” elifi % 5 == 0: print“Buzz“ else: printi
  • 12. Python focus Duck Typing List comprehension
  • 13. Duck Typing class Duck: def quack(self): print("Quaaaaaack!") class Person: def quack(self): print("The person imitates a duck.") defin_the_forest(duck): duck.quack() def game(): donald = Duck() john = Person() in_the_forest(donald) in_the_forest(john) game()
  • 14. List Comprehension What would be the values of listB? listA = [j for i in range(2, 8) for j in range(i*2, 50, i)]listB = [x for x in range(2, 50) if x not in listA] [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
  • 16. IronPython Goals True Python Implementation Seamless integration with .NET
  • 17. IronPython is: Open source Supports both .NET & Mono All CLR types are available Can call .NET code
  • 18. IronPython IDEs VS2010 + IronPython extension #Develop Wing Eclipse + PyDev For more details see: http://www.voidspace.org.uk/ironpython/tools-and-ides.shtml
  • 19. The interactive shell Run code on the fly Run .NET code on the fly >>> print "Hello, world" Hello, world >>> x = 12**2 >>> x/2 72 >>> # this is a comment
  • 20. IronPython in the real world Use IronPython as part of your .NET applications WPF PowerShell ASP.NET Spark Silverlight Robotics Studio XNA Scripting engine
  • 21. Where to start Download IronPython and give it a try TryPython - http://ironpython.net/try/ Read a book Add IronPython to your utility belt
  • 22. Resources IronPython - http://ironpython.net/ IronPython on Codeplexhttp://ironpython.codeplex.com/ Books: Dive into Python - http://diveintopython.org/ IronPython in Action - http://www.ironpythoninaction.com/ Blogs: Voidspace techie blog: http://www.voidspace.org.uk/python/weblog/index.shtml Getting started with IronPython - http://blogs.microsoft.co.il/blogs/dhelper/archive/2009/05/01/beginning-ironpython-development-part-1-where-to-start.aspx Integration: ASP.NET: http://aspnet.codeplex.com/wikipage?referringTitle=Home&title=Dynamic%20Language%20Support SilverLight: http://www.voidspace.org.uk/ironpython/silverlight/index.shtml Spark: http://sparkviewengine.com/documentation/ironpython

Notas do Editor

  1. Show in ipy:x = 5 x = x + 7 # x  12x = x + “spam” # errorx = 5 x = “eggs”x = x + “ and spam”
  2. Need to show VS2010 & #Develop