The Voidspace IronPython Pages

Articles on Developing with IronPython

spacer
The Voidspace IronPython Pages
IronPython in Action
IronPython Articles
IronPython & Silverlight
Embedding IronPython
Windows Forms
The IronPython Cookbook
Planet IronPython
Python Articles

Python is an Open Source, cross-platform, high level, strongly and dynamically typed, interpreted [1] programming language. IronPython is the Microsoft implementation of Python, in C#, which has full integration with the .NET platform and is available under a sane permissive license.

The Python philosophy emphasises readability, clarity and simplicity, whilst maximising the power and expressiveness available to the programmer. The ultimate compliment to a Python programmer is not that his code is clever, but that it is elegant. For these reasons Python is an excellent first language, while still being a powerful tool in the hands of the seasoned and cynical programmer.

Python is a very flexible language and is widely used for many different purposes.

A programming language is a medium of expression - Paul Graham

IronPython in Action is a book written by myself along with my colleague Christian Muirhead for Manning Publications. It is the first English book on IronPython and is aimed at both Python and .NET programmers interested in IronPython. It includes a Python tutorial and chapters on embedding IronPython, system administration, plus web development with ASP.NET and Silverlight.

IronPython & Silverlight is a series of articles (with code examples) on using IronPython with the Microsoft browser plugin Silverlight. Silverlight can be used for media streaming, games and rich internet examples.

IronPython and Windows Forms is series of tutorials on using Windows Forms with IronPython.

Embedding IronPython is a series of articles on embedding IronPython and the Dynamic Language Runtime in .NET applications. It includes using the hosting API from inside IronPython and several examples for download.

IronPython Articles

  • Introduction to IronPython and the DLR

    Just getting started with IronPython or wondering why you should be interested? This article introduces IronPython, explains how it came into existence and some of its more common use cases. The article also shows the basic IronPython and .NET integration with the interactive interpreter. The IronPython interactive interpreter is a great way to learn plus a useful tool for working with the .NET framework. The article even shows how the Dynamic Language Runtime allows languages to interoperate by using a Ruby library (through IronRuby) from IronPython.

  • Python for .NET Programmers

    An introduction to the Python programming language for programmers interested in IronPython. It covers the basic syntax and semantics and touches on how dynamic languages are better (oops - I mean different) to statically typed languages.

  • IronPython Tools and IDEs

    A frequent question on the IronPython mailing list is "what IDE should I use with IronPython?". For many .NET developers the question is phrased slightly differently, "how do I use IronPython in Visual Studio?". This article looks at support in Visual Studio, Eclipse with PyDev, SharpDevelop and the Wing IDE. It also covers other editors and some of the standard Python development tools for code quality, debugging, code coverage, refactoring and complexity measurement.

  • Dark Corners of IronPython

    The IronPython team have done a very good job of integrating Python and the .NET framework without having to change Python or introduce new syntax. Despite this there are various areas where you need to know some IronPython specific information; previous experience of Python or C# alone will not be enough.

    This article contains a lot of the nitty gritty details of how to use Python the language to integrate with the underlying .NET framework.

  • Using the Wing Python IDE with IronPython

    A HOWTO on configuring the Wing Python IDE for use with IronPython; including getting autocomplete (intellisense) for .NET types and launching files with the IronPython interpreter.

  • Simple Server

    A Simple HTTP Server using the HttpListener class. This article also touches on text encoding, asynchronous callbacks, URI and XHTML escaping, the system message box, and creating a simple Windows Forms dialog. If you are new to .NET, this is a valuable tour of parts of the .NET 'standard library'.

  • Dynamically Compiling C# from IronPython

    There are some things you can't do from IronPython, most notably applying .NET attributes to classes and methods. One approach to solving this is to create stub C# classes. This article shows you how to compile dynamically generated C# to in-memory (or on disk) assemblies and then import them into IronPython - all from IronPython code.

  • Functional Testing of Desktop Applications

    An article on functional testing of GUI applications - with the examples written using IronPython and Windows Forms (with downloadable example application with testing framework and functional tests).

  • The CPython Server

    A local server that executes arbitrary CPython code sent to it in a POST request. It can send any response which can be read from IronPython. This is one (hacky!) way in which IronPython can be interfaced to CPython, and use Python modules that aren't available to IronPython.

    The example in this articles uses matplotlib to generate charts, which are displayed from an IronPython application.

  • Threading with IronPython & Asynchronous Exceptions

    A discussion of asynchronous exceptions (and aborting threads), and some simple examples of threading in IronPython.

  • Profiling IronPython

    Some example code (timers) for profiling IronPython code.

  • Using CPython Extensions from IronPython

    An experimental approach, using the CPython interpreter wrapper from Python.NET, to enable you to use CPython extensions from IronPython. It has several limitations, but works!

Presentations

Slides from a few presentations I've done on IronPython. Most of the information in these slides are also in the articles, which tend to be easier to read.

These slides are all S5 Javascript and HTML presentations. If you click on the big '0' link at the bottom right of each slide, you can view the presentation as a single page with my notes visible.

  • ACCU Slides: IronPython & Dynamic Languages on .NET

    Slides for a talk for the ACCU Conference 2008 on IronPython, Silverlight and Dynamic languages on .NET.

  • DDD 6: Dynamic Languages on .NET

    An S5 (html) presentation on Dynamic Languages on .NET. This presentation was given at DDD - Developer Day 6. The talk is on Python, IronPython, Silverlight and the Dynamic Language Runtime. spacer

  • Developing with IronPython and Windows Forms

    An S5 presentation on developing with Windows Forms. Presented (in short form) at PyCon 2007 by myself and a colleague. You can either view this as slides, or as a single longer page with lots of notes.

Planet IronPython is an aggregation of blogs from developers who regularly use and comment on IronPython related topics.

The IronPython Cookbook is a Wiki full of examples of using IronPython and .NET. It has useful recipes on interacting with Excel and IIS, Direct3D and XNA, working with databases, network protocols and much more!

For my day job I work at Resolver Systems. We are creating an application development tool with a spreadsheet interface using IronPython. It is free for non-commercial and Open Source use. For more information about how Resolver One works, and some of the cool things you can do with it, visit Resolver Hacks.

Tabbed Image Viewer is an example application demonstrating Windows Forms, using a variety of controls in 18k of source code, including a really funky about dialog. It also has C# showing a custom executable (the simplest example of embedding the IronPython engine) and creating a C# class and then using it from IronPython.

IronPython-URLs is a blog aggregating articles, news and links on IronPython and the Dynamic Language Runtime. I maintain it, with occasional contributions from Mark Rees and Seo Sanghyeon.

Fepy is the community edition of IronPython. There are compiled binaries for Mono, extra standard library modules and patches that haven't yet been integrated into the official Microsoft release.

My blog regularly includes entries about IronPython. You can see the most recent IronPython entries in the IronPython Category, and all the IronPython posts from the All by Category Page.


[1]Python programs are actually compiled to byte-code before being executed, but the byte-code is then interpreted. In some ways this is similar to Java or .NET which also compile to byte-code. Because these languages are statically typed with JIT compilers, they are generally considered as compiled languages whilst Python is generally considered as being interpreted.

For buying techie books, science fiction, computer hardware or the latest gadgets: visit The Voidspace Amazon Store.

spacer

Return to Top

spacer

Last edited Fri Nov 27 18:32:35 2009.

Counter...

 
 
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.