python 101 for the net developer

Post on 03-Sep-2014

5.496 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Given on Tuesday, June 23, 2009 at the Greater Cleveland PC Users Group C#/VB.NET SIG. A very basic intro to Python given to a .NET crowd with the assumption of little to no Python experience.

TRANSCRIPT

Python 101 for the .NET Developer

Sarah Dutkiewicz

http://www.clevelanddotnet.info

What is Python?

What is Python?

What is Python?

What is Python?

Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days.

- Taken from the official Python site, python.org

Who’s Using Python?Python plays a key role in our production pipeline. Without Python a project the size of Star Wars: Episode II would have been very difficult to pull off. From crowd rendering to batch processing to compositing, Python binds all things together. -- Tommy Burnette

Who’s Using Python?

Python has been an important part of Google since the beginning. -- Peter Norvig.

http://code.google.com/appengine/Python application servers and Python scripting to create the web UI for BigTable (their database project)

Who’s Using Python?

We chose Python because it provides maximum productivity, code that's clear and easy to maintain, strong and extensive (and growing) libraries, and excellent capabilities for integration with other applications on any platform. -- Steve Waterbury

Workflow automation servers

More Python in Action

Features of Python

•Free and open source• Great first language

• Availability (cross-platform)• Interactivity (interpreted

language)• Simplicity

•Scalable – can play nicely with other languages•GUI support – GUIs typically developed with Tk

Python’s Weaknesses

• Can be slower than compiled C or C#• Relies on a locking mechanism called the Global Interpreter Lock (GIL) in multi-threading

• Implementations in other languages get around – specifically Jython and IronPython

Implementations

• CPython - implemented in C, the primary implementation• Jython - implemented for the JVM• Pypy - implemented in Python• IronPython - implemented in C#, allows python to use the .NET libraries

What is IronPython?

IronPython is the open source .NET implementation of the Python programming language, giving Python programmers the benefits of the .NET libraries while still maintaining compatibility with straight Python.

Modules

• Databases– PyGreSQL (PostGreSQL)– MySQLdb (MySQL)– cx_Oracle (Oracle)

• Instant Messaging– Pymsn (MSN Messenger)– Jabberpy (Jabber)

More Modules

PyOpenGL

More Modules

• Graphics (gdmodule, VideoCapture, PIL)• Math & Science (scipy, NumPy, numarray, matplotlib)• Hardware

– Serial ports (pySerial, USPP)

– Parallel port (pyParallel)

Frameworks

• PyCon (http://www.pycon.org)

• SuggestionBox.com

• Curse.com (WoW add-ons)

• BitTorrent

• Reddit

• IMDBTube

• Streetspottings.com

• IM Feeds

XKCD

Demos

User Groups & Events

• Cleveland Python Users Group– First Monday of the month– Past topics include:

• Ingredients for a Python DSL• Dependency Injection Framework• Distributed Issue Tracking• Screenlets for making Linux desktop widgets• Guppy – a memory debugging package

GiveCamp

•What: A weekend of coding charity projects with other geeks•When: July 17-19, 2009•Where: Columbus, OH and Ann Arbor, MI•More info: http://www.columbusgivecamp.org and http://www.michigangivecamp.com/AnnArbor

PyOhio

•What: 2 day conference on Python•When: July 25-26, 2009•Where: The Ohio State University, Knowlton Hall, Columbus, OH•More info: http://pyohio.org or Follow PyOhio on Twitter as @pyohio

Python Web References• Official Python Site: http://www.python.org/

• User Groups & Events– Cleveland Python Users Group: http://clepy.googlegroups.com

– PyOhio: http://www.pyohio.org

– PyCon: http://www.pycon.org

• Modules– 50 Modules for All Needs: http://

www.catswhocode.com/blog/featured/python-50-modules-for-all-needs-10

• Frameworks– Django: http://www.djangoproject.com/

– Pylons: http://pylonshq.com/

•Official IronPython Site: http://www.codeplex.com/ironpython•IronPython Cookbook: http://www.ironpython.info•The Voidspace Techie Blog: http://www.voidspace.org.uk/python/weblog/•DevHawk’s Blog: http://www.devhawk.net/•The Mono Project: http://mono-project.com•FePy and IronPython Community Edition http://fepy.sourceforge.net

IronPython Web References

Python Recommended Reading

• Python Cookbook by Alex Martelli, Anna Ravenscroft, and David Ascher (ISBN: 978-0596007973)

• Python Programming for the Absolute Beginner by Michael Dawson (ISBN: 978-1598631128)

• Core Python Programming by Wesley Chun (ISBN: 978-0132269933)

IronPython Recommended Reading

http://www.ironpythoninaction.com

I recommend technical books typically based on their reference value, as I usually get bored within the first few sentences and end up turning them into references rather than reading through them. This book, however, was one that I read cover-to-cover...Overall, I would recommend IronPython in Action for anyone wanting to learn IronPython.

– Sarah DutkiewiczThe Coding Geekette (reviewed for Manning Publications)

top related