Entries in the Category “news”
written by Michael Foord, on 7/20/09 12:34 PM.
September 23-24th I'll be presenting a two day training session in Stockholm (the training is in English) with addskills. It is aimed at .NET developers looking to use IronPython for application development, scripting, embedding, testing or just as another useful tool. It will be a comprehensive training session for those with .NET experience who are interested in making practical use of IronPython. There will even be some IronRuby examples covered.
It looks like attendees will also get a free copy of IronPython in Action.
Categories:
news |
Tagged as:
training
|
0 comments
written by Michael Foord, on 6/22/09 12:16 PM.
Thanks to the wonder of Twitter I've heard about two different college courses that will be using IronPython in Action as course material next semester. One is Sargeant Reynolds College in America, with a course taught by Kevin Hazzard, and the other is Northtec in New Zealand with a course taught by Tony Meyer.
IronPython is an ideal language for learning programming, it has the great combination of an easy to learn general purpose programming language (Python) with a programming environment which is widely used in commercial development (the .NET framework). Not only these factors, but it is easy to teach good programming practise with Python; things like well structured code, testing, computer science theory including elements of functional programming and so on.
I exchanged emails with Tony who explained why he is using IronPython in Action:
The course is (unimaginatively) titled "Programming" (not my
doing!). It's at NorthTec at the Whangarei
campus (a couple of hours north of Auckland). It's the second
programming course in their Bachelor of Applied Information Systems
degree. We switched the first course from VB to Python a couple of
years ago, but left this one as VB (because it's their introduction to
Visual Studio and .NET).
Early last year I started work convincing people that IronPython would
be a good choice, since they can continue with a language they
(somewhat) know, but still get the intro to the Microsoft toolchain
(plus, I hate VB, and dislike teaching in a language I never use in
practice). I was expecting that I'd have to continue on without a
textbook, until I saw that IronPython in Action was coming out.
BTW, while it's not like there is much choice in the way of books,
yours is an excellent fit. The first section is a good Python
refresher and .NET introduction. I introduce unit testing to them in
the course, and the book handily has a chapter on that. They do a lot
of sysadmin work later in their degree, so the chapter on using
IronPython / PowerShell is great. They do ASP.NET stuff later on as
well, so that'll be a good reference at that time (I don't expect I'll
have time to cover that myself). I introduce them to databases and
(since a couple of years ago) web services, and there's a chapter on
that. Silverlight is an interesting example, and something I expect
they'll be interested in given the later web development work, and
there's an introduction to that.
Basically, you couldn't have done a lot better if I'd commissioned it!
Thanks! - it certainly has made redoing the course material much
simpler than if I was working completely from scratch.
As I mentioned in my tweet, I'll put my course material online at some
point in the next couple of weeks (it's not quite finished) in case
anyone else is interested in it.
Categories:
news |
Tagged as:
teaching
|
0 comments
written by Michael Foord, on 6/9/09 11:45 AM.
Chapters three to six of IronPython in Action take you through building a simple example application called MultiDoc. MultiDoc is a multi-tabbed text editor using Windows Forms for the user interface. It is built with a few common design patterns (Model View Controller, command pattern, observer pattern and so on) to demonstrate structured programming with Python. In the process of building MultiDoc the reader will work with various .NET libraries and explore Python language features.
The source code for all the examples in the book can be downloaded from the Manning website or from the Sources page of this website.
The intention is that MultiDoc, along with as many examples from the book as possible, run on both Mono and the .NET framework; IronPython isn't just for Windows but can also be used on Linux and Mac OS X or anywhere that Mono will run.
Some readers have reported that MultiDoc crashes on exit when run with Mono. The root cause of this is the old version of IronPython 2 that ships with Mono. The full Mono distribution includes both IronPython 1 and 2, so after installing the full version of Mono you can run commands like:
ipy MultiDoc.py
ipy2 MultiDoc.py
Note
In the debian and Ubuntu distributions of Linux IronPython is packaged separately from Mono. You can install IronPython 1 with: sudo apt-get install ironpython.
The versions of IronPython included in Mono come from the FePy project; a community distribution of IronPython which can be compiled with Mono. The version of IronPython 2 is 2.0 Alpha 5 which is pretty old. Unfortunately Mono bugs or incompatibilities have stopped more recent versions being compiled with Mono. It isn't all bad news as IronPython 2.6 can be compiled with Mono which means we should have a FePy updated once this comes out. You can read more on the details in the FePy Status Update.
Some bug in either IronPython or Mono means that you will see the following crash on exiting MultiDoc when using IronPython 2a5 from Mono:
**
ERROR:generic-sharing.c:301:move_subclasses_not_in_image_foreach_func:
assertion failed: (subclass->image == image)
Abort trap
This is reason enough to look at using a more recent version of IronPython 2. Even though IronPython can't be compiled with Mono you can still use the up to date Windows binaries (which is part of the point of Mono - binary compatibility). To use the latest version of IronPython (2.0.1) you'll need Mono 2.4 or more recent. For Mac OS X you can use the Mono Apple installer. For Linux you'll need to build Mono from source. This blog entry by Ali Afashar explains how to get IronPython 2 working with Ubuntu:
Categories:
news, sources |
Tagged as:
examples, mono
|
0 comments
written by Michael Foord, on 5/14/09 11:40 PM.
Inevitably in any technical book there will be typos and errors. Much as I would love that not to be the case for IronPython in Action a few errata have already been reported. So that they don't get lost I've created a new page on the website to track them.
If you spot typos, have any questions or find something that looks like an error then please post on the IronPython in Action Author's Forum. All the genuine errors, or any changes needed due to new releases of IronPython, will be posted to the errata page.
Categories:
errata, news |
0 comments
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
Categories:
news |
Tagged as:
magic methods, reference
|
0 comments
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:
Categories:
news |
Tagged as:
preface
|
0 comments
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
Categories:
news |
Tagged as:
magic methods, reference
|
0 comments
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
Categories:
news |
Tagged as:
magic methods, reference
|
0 comments
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.
Categories:
news |
Tagged as:
magic methods, reference
|
0 comments
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…
Categories:
news |
Tagged as:
Jim Hugunin
|
0 comments
Back to top