Your SlideShare is downloading. ×
  • Like
  • Save
The .NET developer's introduction to IronPython
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

The .NET developer's introduction to IronPython

  • 4,082 views
Published

A .NET developer introduction to IronPython - with code

A .NET developer introduction to IronPython - with code

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
4,082
On SlideShare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
0
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Show in ipy:x = 5 x = x + 7 # x  12x = x + “spam” # errorx = 5 x = “eggs”x = x + “ and spam”
  • Need to show VS2010 & #Develop

Transcript

  • 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
  • 5. Python flavors
  • 6. What about IronPython?
  • 7. The Python language
  • 8. Multi Paradigm
  • 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
  • 10. Data Types
  • 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]
  • 15. What about IronPython?
  • 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