Skip to: site menu | section menu | main content

IronPython in Action News

News on the IronPython in Action book and sources.

Currently viewing: Front Page

Archive for April 2009

Online Magic Methods Reference Completed

written by Michael Foord, on 4/26/09 8:26 PM.

Appendix B of IronPython in Action is a reference to all the common Python protocol methods. The protocol methods, known as magic methods, start and end with double underscores and are implemented by objects to support iteration, indexing as a container and all the Python protocols. I've been putting parts of the appendix online as I've had time; and it is now complete.

The new sections that I've just added are:

  • Magic attributes
  • Functions and modules

New Amazon Reviews

written by Michael Foord, on 4/24/09 1:00 AM.

There have been two new reviews posted on Amazon; one on Amazon.com and the other on Amazon.co.uk. I won't be posting here every time a new review goes up on Amazon, but this is the first on the British site and only the second on the main site. As the book hasn't been out very long it is very encouraging to see the book being well received by real life readers!

The new review on the US site is by Hernan Garcia:

A very good and useful book to start using IronPython. You only need to have an idea of programming (any language) before starting with this book. It will be useful for both the Python programmer or the .Net programmer.
The demo application is done following good programming practices and common patterns (something very much welcomed).
The book shows how to use the language in desktop and web applications; Silverlight and embedding it into your c# apps. (Ex: as an scripting option for your users to extend the program).
It reads pretty fast. I didn't find any cruft on the book, something that is not very common with technical books. Along the chapters you will find pointers to resources in the internet to deal with subjects that are not specific to the book but they are mentioned or referenced somehow.

The reviewer on the UK Amazon site is J.D. Schans:

Fantastic book: Straightforward enough for me to get started, but with enough detail to be useful as a reference book as well. Particularly liked the Silverlight and the testing chapters. Fun style of writing and 'real' enough examples.

Preface to IronPython in Action

written by Michael Foord, on 4/23/09 1:58 PM.

The preface to IronPython in Action tells the story of how Christian and I came to be involved in IronPython and go on to write the book. This necessarily involves the story of Resolver Systems, the company that both Christian and I work for creating a spreadsheet application development system that is written in and embeds IronPython.

I've put the preface online in a post on the IronPython-URLs blog:

Context managers, the with statement and the descriptor protocol

written by Michael Foord, on 4/22/09 9:19 PM.

I've added another two sections to the magic methods online reference.

See this entry for sections previously added to the magic methods reference. Newly added sections are:

  • Context managers and the with statement
  • The descriptor protocol

More Sections Added to Magic Method Reference

written by Michael Foord, on 4/18/09 2:34 PM.

I've added more sections from appendix B to the online reference on the Python protocol methods.

The protocol methods are the ones that start and end with double-underscores and the different protocols roughly correspond to interfaces in other languages. The new sections added are:

  • Conversion to string
  • Attribute access
  • Numeric types - binary arithmetic operations
  • Numeric types - unary arithmetic operations
  • Numeric types - type conversion

Python Magic Method Reference

written by Michael Foord, on 4/16/09 1:47 PM.

Appendix B of IronPython in Action is a reference to all the common magic methods in Python. The magic methods are used by the Python protocols, like iteration and accessing objects by indexing; they are roughly the equivalent of interfaces in other languages.

As this appendix is a useful reference for both the Python and IronPython communities I'm putting it online.

Formatting the whole of this appendix for the web is quite a big task, so I'm putting it online in stages. Currently up are references on:

  • Object creation
  • Comparison methods
  • Miscellaneous methods
  • Containers and iteration
  • Generator expressions and conditional expressions

As I get new sections up I'll post entries on this blog. Many thanks to Manning Publications for permission to reproduce it.

Jim Hugunin on IronPython in Action

written by Michael Foord, on 4/15/09 2:00 PM.

Jim Hugunin is the creator of IronPython and we were very fortunate to get him to write the foreword to IronPython in Action. In the foreword he explains how he came to create IronPython, which is a fun story, and how he has come to appreciate the .NET framework as a versatile platform where multiple languages really can interoperate. He has posted the foreword on his blog (which he says keeps him on track for his quota of one post every six months), and you can read it in full at:

My favourite part of the foreword is:

After getting over my initial skepticism, I've grown to love the CLR and .NET as much as Python. While no platform is perfect, this is the closest that we've ever come to a universal runtime that can cleanly support a wide variety of different programming languages. Even more exciting to me is that the team is committed to the multi-language story and we've got great projects like the DLR, IronRuby and F# to keep extending the range of languages that can coexist on this platform. I've even grown to like C# as by far the most enjoyable and versatile statically typed programming language I've used.
As the architect for IronPython, I like to believe that it's such a simple and elegant combination of the Python language and the .NET platform that it needs no documentation. After all, who could possibly not know that they should use clr.Reference to pass an out parameter to a .NET method. Well, I guess that it's assumptions like that one that make me a poor choice for writing a book teaching people about IronPython. The best choice for writing a book like this would be a long-term user who's deeply engaged with the community and who has been trying to understand and explain the system to others for years.
Now, if only we could find such a person…

First Amazon Review

written by Michael Foord, on 4/15/09 1:53 PM.

Now that the book is out and people are actually reading it I'm slightly nervous as to how it will be received. Obviously it is a fantastic book, and all the reviews so far have been very positive, but even so...

It's therefore very encouraging to see that the first review on Amazon.com has arrived, and it's also positive (and I don't even know the reviewer):

Written by Python Experts who have developed complex applications with IronPython, this excellent book covers IronPython 2 and provides several code examples illustrating how faithful IronPython 2 is to Python 2.5 and how .Net and Python concepts map to each other. The diverse examples range from showing how IronPython integrates nicely with various .Net libraries such as Windows Forms, Windows Presentation Foundation and Silverlight, to how Python's advanced features can be used effectively in agile testing, and to how C# and VB.Net applications can embed the IronPython Engine to run Python code and scripts. The book also tackles areas in which the integration between IronPython and .Net is currently not straightforward, providing guidance on how to work around these issues, as well as information on how Microsoft may address these remaining issues. Overall, I think the authors did an excellent job, and even readers who may be relatively new to either Python or .Net will find the book an easy and valuable read because of the many little things that the authors did (e.g., thoughtful and concise explanations, copious code, great references, etc) to make it so!!

Amazon reviews are very important to the success of a book, so if you've read IronPython in Action (and particularly if you've enjoyed it) we'd really appreciate a review. Thanks!

IronPython in Action Available!

written by Michael Foord, on 4/10/09 4:51 PM.

After two and a half years of work IronPython in Action is finally available!

Quotes on IronPython in Action

IronPython in Action is the first book (in English anyway...) on IronPython. It is written by myself and my colleague Christian Muirhead, with a foreword by Jim Hugunin (the original creator of IronPython). The technical editor is Dino Viehland, core IronPython developer.

Two of the chapters are available for free download:

IronPython in Action is available from:

You can find a full table of contents at About IronPython in Action. Every dead tree version of the book comes with a free e-book (pdf).

Back to top