Posts

Showing posts from October, 2009

The Dynamic Languages Team

A blog entry from Lisa Feigenbaum (the Microsoft Visual Studio Languages Community Program Manager) introduces us to all the members of the IronPython and IronRuby development teams and the MVPs (community members). Connecting with IronPython & IronRuby Team Members IronRuby: website , mailing list IronPython website , mailing list In the blog post you can find details of all the team members, including links to their blogs and twitter accounts. Team members: Jim Deville (IronRuby) Jimmy Schementi (program manager for dynamic languages Silverlight integration) Harry Pierson (IronPython program manager - but not for much longer) Dave Fugate (IronPython testing and release infrastructure guy) Dino Veihland (IronPython) Tomas Matousek (IronRuby I *think*) Shri Borde (the man in charge) David Dicatio (IronPython) Missing from this list is John Lam (IronRuby program manager) and Curt Hagenlocher who was an IronPython developer but may now be working on a secret projec

A Good Mix 27: A Dynamic T-Shirt, Testoob, Mathematica and Blaze

Yet another collection of IronPython and DLR related articles, projects and blog entries from the past few weeks. You had me at dynamic  An IronPython T-Shirt created by Harry Pierson . The text is C# + IPy = <3. You had me at "dynamic" . Testoob 1.15 Released Testoob Project Homepage  The latest release of the Testoob project (yet-another-Python-testing-framework) announces IronPython support. I haven't used Testoob, but it is nice to see more projects supporting IronPython: Testoob is an advanced testing framework and test runner for Python. As a test runner, it can run your unittest test suites and make your test-running easy with tons of useful options. As a framework, you can use it to make your test-writing easy with even more useful options. Version 1.15 (Oct. 2009) adds better Python 2.6, IronPython, and Jython support, as well as test coverage improvements, better color support, and some new options and bugfixes. BoxHeadRoom: IronPython and Mathematic

Working with .NET Code Remotely with execnet

Testing is a big topic in Python, with major libraries like py.test and nose pushing forward the state of the art. Even the standard library module unittest has had a lot of improvements that will appear in Python 2.7 and 3.2. Part of py.test is a library for distributed testing and deployment with remote Python interpreters. This library is called execnet : The execnet package allows you to: instantiate local/remote Python Interpreters send code for execution to one or many Interpreters send and receive data through channels execnet performs zero-install bootstrapping into other interpreters; package installation is only required at the initiating side. execnet enables interoperation between CPython 2.4-3.1, Jython 2.5.1, PyPy 1.1 and IronPython and works well on Windows, Linux and OSX systems. Support of Jython and IronPython are experimental at this point. Feedback and help with testing welcome. The IronPython support allows you to remotely work with .NET objects / libr

IronPython 2.6 Release Candidate 2 and news from DevHawk land

A new release candidate for IronPython 2.6 has just been released. This is the third release in under a week for the IronPython team, following on from the releases of IronPython 2.0.3 and and IronPython 2.6 for .NET 4.0 Beta 2 . IronPython 2.6 is (or will be) a big release. The major feature is compatibility with Python 2.6, but there are a whole host of others features as well: The __clrtype__ metaclass for data binding and .NET attribute support Implementation of the ctypes module Support for Python stack frames and sys.settrace , which means the pdb debugger works Better performance through adaptive compilation Faster startup The new release: IronPython 2.6 Release Candidate 2 Performance Comparison of IronPython 2.6 RC2 and Python 2.6 We’re pleased to announce the release of IronPython 2.6 Release Candidate 2.  Since the public availability of Release Candidate 1, we’ve addressed the following: The “ json ” CPython package has been included with our MSI installer

Improvements to Try Python: File I/O

Try Python is an online Python tutorial that has an interactive interpreter running in the browser through the magic of Silverlight and IronPython. Try Python presents the Python tutorial, with executable code examples for you to try out. However, because Silverlight is a sandboxed browser plugin, with no access to the local filesystem, the parts of the tutorial that do file I/O didn't work. I've fixed that by reimplementing the file type (and swapping out the builtin file type and open function) in pure Python using local browser storage to store files. You can now create files from the interpreter and read them back in in exactly the same way you do in standard Python on the desktop. This pure Python implementation of file also has other potential uses, for example unit testing filesystem access. Testable file Type and File I/O in Try Python A few weeks ago I announced Try Python, a Python tutorial with interactive interpreter that runs in the browser using IronP

Python on .NET: PyPy-cli-jit

PyPy is the combination of an interpreter compiler toolchain that allows you to write interpreters (Virtual Machines really) in a static subset of Python, called RPython, along with an implementation of Python in RPython. The compiler toolchain allows you to compile your interpreters for several backends. The major backends are native code, for the JVM and for the CLI (which is .NET and Mono). This allows you to maintain a single codebase and produce an interpreter that runs on all these platforms. The PyPy .NET backend is called pypy-cli. PyPy on its own runs at somewhere between the same speed as CPython and twice as slow. Because it has better garbage collection (PyPy doesn't use reference counting) there are some things it does faster but there are also places it is slower. There are various cool things about PyPy, for example it is already useful where you want a sandboxed Python interpreter. The really cool thing, and perhaps one of the driving forces for creating PyPy

IronWatin: mind the gap

WatiN is a .NET automated web testing tool inspired by the Ruby tool Watir . R. Tyler Ballance has been working on IronPython integration for WatiN, based on the Python unittest testing library (of which I am particularly a fan) and designed to be as 'pythonic' as possible. IronWatin: mind the gap   IronWatin Project Home on GitHub   Last week @admc , despite being a big proponent of Windmill , needed to use WatiN for a change. WatiN has the distinct capability of being able to work with Internet Explorer's HTTPS support as well as frames, a requirement for the task at hand. As adorable as it was to watch @admc, a child of the dynamic language revolution, struggle with writing in C# with Visual Studio and the daunting "Windows development stack," the prospect of a language shift at Slide towards C# on Windows is almost laughable. Since Slide is a Python shop, IronPython became the obvious choice. Out of an hour or so of "extreme programming" which

IronPython 2.0.3 (and uninstalling IronPython for .NET 4 Beta 1)

As always the IronPython team aren't content with one new release , but have pushed out another as well. While IronPython 2.6 gets closer to its final release there is still life in IronPython 2.0. A new bugfix version, 2.0.3, has just been released. IronPython Release 2.0.3   Note: this version of IronPython is for .NET Framework 2.0 SP1, 3.0 and 3.5. If you want a version of IronPython to work on .NET Framework 4.0 with C# 4.0's new "dynamic" keyword, you need a compatible version of IronPython. IronPython 2.0.3 is a minor update to IronPython 2.0.2 and the latest in a series of CPython 2.5-compatible releases running on the .NET platform. Again, our priority was to make IronPython 2.0.3 a bugfix release that remains backwards-compatible with IronPython 2.0.2. In particular, we focused on issues the IronPython community brought to our attention through CodePlex. As such, there have been important improvements on the compatibility and stability of IronPython as

IronPython and IronRuby for .NET 4.0 Beta 2

If you're part of the Python community then it may well have passed you by that a major new release of the .NET framework is imminent. .NET 4.0 is a new version of the Common Language Runtime (CLR), unlike 3.0 and 3.5 which were primarily new libraries and language enhancements for C# and VB.NET. A big part of .NET 4.0 is the Dynamic Language Runtime (DLR), on which IronPython and IronRuby are both built, and parts of the DLR are moving into the core .NET. This enables the introduction of the dynamic keyword in C# 4.0 and VB.NET 10. One of the major use cases for the dynamic keyword is to make it easier to integrate dynamic languages with the statically typed ones, for embedding or for hybrid applications. A minor addendum to the new .NET 4.0 is Visual Studio 2010. .NET 4.0 Beta 2 is the second beta (Community Technology Preview - CTP) of both .NET 4.0 and Visual Studio 2010. To go with this CTP there are new releases of both IronPython and IronRuby. IronPython 2.6 CTP for

Articles by Ibrahim: IronPython Console, ASP.NET, Visual Studio and readmee.com

Ibrahim is the Turkish blogger whose posts and articles on IronPython that we've featured before . He has published several more articles in English on working with IronPython and one article in Turkish. IronPython Console  In this article we take a deep look at IronPython Interactive Console. We will see some basics of Python and IronPython to become acquainted with the IronPython environment. IronPython interactive interpreter console is the easiest way to start using IronPython.  We can easily explore whole IronPython world which is include ironpython modules, .Net libraries and Python Built-in’s. For IronPython starters it’s great way to exploring .Net Libraries. We can use IronPython Interactive Interpreter for start to developing WinForms, COM objects, WPF, XNA, Embeding C#, Silverlight… projects. Asp.NET with IronPython Integration One of the IronPython development area is Asp.NET. In this article we will see Visual Studio 2008 Asp.Net integration. First check out the

Sheldon: A WPF IronPython Console Control

Image
Sheldon is a Windows Presentation Foundation (WPF, the Windows user interface library that is part of .NET 3) component for embedding an interactive interpreter into a .NET application. Embedding IronPython is one of the core use cases for IronPython and whilst I have seen several Windows Forms Console components, but this is one of the first reusable WPF one I'm aware of. Sheldon: A WPF IronPython Console Control Sheldon Project Subversion Repository This sample was created to pitch an idea to a client about enabling a macro system in their application. Users might be able to make use of functions like OpenAccount("ACME") , ExecuteJob("SalesForecast2009") , and so on. Using the Command Pattern, commands could be written to an Output window in the application while the user uses the UI - that could be used as a learning tool for learning the command line.  

A Good Mix 26: Winforms in Arabic, xbuild, Mono on Mandriva, Scheme and Poker

Still working through the large collection of IronPython and DLR related articles that I've discovered in the last few weeks. Only a few more to go. Windows Forms with Mono and IronPython - in Arabic  This is a translation of the Winforms with Mono and IronPython Tutorial Series  into Arabic. It includes implementations of Snake and Tetris games as the final two parts of the tutorial showing how to create applications with IronPython on Mono or .NET.   xbuild and Mono 2.6p1 A blog entry on new features in Mono 2.6 which has just had a preview release . Included in the release is xbuild , the Mono implementation of the MSBuild tool. xbuild is now compatible enough that it is capable of building IronPython and IronRuby. Mandriva 2009.1 on mono and IronPython This is a Japanese blog entry on using IronPython 2.0 with the Mandriva Linux distro. From the same blogger who has also blogged about IronEditor ,  IronScheme - An R6RS conforming Scheme implementation based on the Microso

Lightweight Debugging for Hybrid C#/IronPython Apps

Harry Pierson, IronPython program manager for Microsoft, has written a series of posts on using a new feature in IronPython 2.6 to assist with debugging when embedding IronPython in .NET applications. The focus is not just on embedding for scripting, but actually using IronPython for polyglot programming - writing hybrid applications using both IronPython and C#. Lightweight Debugging for Hybrid C#/IronPython Apps  Seriously, let me introduce you to the worlds simplest Twitter application: GetThings. The app downloads a list of my tweets via the Twitter API and displays them in a list box. The UI is written in C# while the tweet download code is written in Python. Clearly, this is a pretty brain dead app – but the point isn’t to build a great Twitter app but rather to show how to use the settrace API from C#. I’ve stuck the code up on GitHub. If you want to see the basic app in action sans debugging, start with the initial checkin. As you can see here, basic C# / IronPython integra

A Good Mix 25: The SharePoint Object Model, IronPython Tutorial, Crazy Snake and IronRuby

Yet another collection of IronPython and DLR related articles, projects and blog entries from the past few weeks. Using the SharePoint Object Model with IronPython  The iLove SharePoint blog recently posted an example of using the SharePoint object model from IronRuby . In the interests of balance he has posted the same example with IronPython. IronPython Tutorial: Basics IronPython Tutorial: Advanced (Events, Delegates, WinForms, WPF) IronPython Tutorial: Debugging (CLR Debugger)  The AvbWiki, a Russian developer wiki, has put online several IronPython tutorial pages. It looks like it is mainly based on the tutorial that comes with IronPython 2, but could be a useful online reference on IronPython. Intellisense for IronPython  Another release from the mysterious Japanese IronPython and Windows Forms project that we've covered before . crazysnake; ironpython and java, just monkeying around  This weekend I finally got around to downloading IronPython 2.6rc1 to test it agai

Introduction to IronPython, Python for .NET Programmers and Dark Corners of IronPython

I've written three new articles on IronPython and put them up on my website . The first two are for developers new to Python or to IronPython whilst the third will be useful to anyone developing with IronPython whatever their programming background. 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 sy

A Good Mix 24: Commerce Server 2009, SharpDevelop 3.1, NWSGI, PyCon India and more...

Another collection of blog entries and articles related to IronPython and the Dynamic Language Runtime. Commerce Server 2009 Product Query via IronPython A blog entry from Charles Medcoff with a nice example of writing product queries for Commerce Server 2009 (the Microsoft e-commerce platform) with IronPython, including the necessary app.config magic to get it to work. SharpDevelop 3.1 Released   SharpDevelop is a .NET IDE for Windows with excellent support for IronPython in its latest version. This release is the final version of 3.1, which includes the new IronPython support (including forms designer and debugger): Seven months after the 3.0 release comes version 3.1 – the last feature release of the 3.x series. The following high-profile features were added to SharpDevelop: IronPython Windows Forms Designer Debugging Support for IronPython Applications Profiler for Managed Applications The Future: 3.1.x and 4.0 SharpDevelop 3.1 is a long-term stable release branch as w

IronPython articles in English and Videos in Turkish

Ibrahim Kivanc is a Turkish blogger and programmer whose articles on Silverlight we have covered previously . He has now translated some of his articles on IronPython into English for us poor foreigners and created some screencasts in Turkish. IronPython: Dynamic Languages  As you know programming languages classified in two way; Dynamic Languages and Static Languages. In some cases Dynamic Languages has many advantages rather then Static Languages. Python/IronPython and Ruby are Dynamic Languages; C#,Visual Basic are Static Languages. Dynamic Languages that execute at runtime many common behaviors that other languages might perform during complication, if at all. These behaviors could include extension of the program, by adding new code, by extending objects and definitions, or by modifying the type system, all during program execution. These behaviors can be emulated in nearly any language of sufficient complexity, but dynamic languages provide direct tools to make use of the

Try Python: Interactive Python Tutorial with Silverlight (and rst2xaml)

Silverlight is the Microsoft browser plugin runs on the Mac and Windows and in Safari, IE and Firefox browsers. As an added bonus it also supports IronPython , making it an ideal tool to build an interactive Python tutorial with. Try Python is an open source project that takes the official Python tutorial and puts it alongside an interactive Python interpreter running in the browser. All of the code examples have a button to execute them in the interpreter, or you can just follow the tutorial trying out the examples yourself. Try Python: Interactive Python Tutorial in the Browser Try Python Page on the Silverlight.net Community Site Try Python Announcement with Screenshots Try Python Google Code Project Page with Source Repository The Mono team are working on an implementation of Silverlight for Linux called Moonlight . The version capable of running IronPython code is Moonlight 2, but unfortunately the preview release can't yet run Try Python. Hopefully that will be fixed

Distributing IronPython Packages: distutils, site-packages and PEP 370

The basic way of distributing and installing Python libraries (packages), and even scripts and applications, is with distutils which is part of the Python standard library. A Python package consists of various source files and a setup.py script, which when executed at the command line installs the Python package into your site-packages folder. The typical invocation of a setup script is: python setup.py install site-packages is a directory created as part of a standard Python installation specifically to hold user installed Python packages (glossing over the difference between user and system installed packages for the purposes of this discussion). Unfortunately distutils doesn't work with IronPython, for at least two reasons. The second reason, the most easily dealt with, is that attempting to install a package with IronPython causes distutils to attempt to bytecode-compile the Python files; something destined to fail with IronPython. C:\compile\test\foo-1.0>i

Using IronPython as a Scripting Engine

IronPython makes adding Python scripting to .NET applications very simple. .NET applications interact with Python code through the DLR hosting API which is easy to use once you get used to the basic principles. You can find a guide to working with the DLR hosting API in IronPython in Action or my series of articles and examples on embedding IronPython . A blogger called rune has been experimenting with embedding IronPython in C# business applications. Using IronPython as a scripting engine In this post I will look into the subject of extending an application written in a traditional .NET language like C# using IronPython. I am not talking about authoring assemblies by writing them in IronPython, though: I’m talking about letting some third party create plug-ins in Python which my application will load and execute at runtime. Let’s say we are C# programmers developing some LOB application for processing orders from a fixed set of customers. Since these are trusted customers, they

Pumping Iron in Denmark and on Channel 9

Harry Pierson, IronPython program manager, has now returned in triumph from his world tour . The world tour included a series of talks at Danish universities and the Copenhagen .NET user group. Danish University Tour Trip Report  At each of these universities, I did two talks. The first was Pumping Iron: The State of Dynamic Languages on the .NET Framework. That’s the one in the Channel 9 video. The other talk was Developing with the DLR , which I’ve posted to my Skydrive. That talk was more focused on the CLR and DLR as a platform for language development. If there’s interest (leave a comment), I’ll record audio for that presentation and post it up on SlideShare or something like that. If you aren't prepared to take Harry's word that it went well, here is a blog entry from Allan Juhl Petersen who attended one of the presentations: IronPython in Copenhagen I had the pleasure of attending Harry Piersons TechTalk at Microsoft Development Center Copenhagen (MDCC) on IronPytho

IronPython 2.6 and the Roadmap Beyond

The IronPython team just released IronPython 2.6 Release Candidate 1 . Since the release there have been a few changes and a few bug reports so there will be another release candidate before the final release. Harry Pierson, IronPython Program Manager, has done two blog entries discussing what is in the new release and the roadmap for IronPython beyond the 2.6 release. IronPython 2.6 Release Candidate As I’ve written before on this blog, this is a HUGE release for us: Python 2.6 features such as with statement, class decorators and byte literals Adaptive Compilation __clrtype__ Metaclasses ctypes and frames support Lightweight Debugging 417 bugs fixed! Anyway, with 2.6 winding down, the IronPython team finds ourselves in a unique position that we’ve never been in before: caught up. As far as I can tell, most of the Python community hasn’t made the move to Python 3.1 and Python 2.7 is looking like it will be released next summer. So IronPython is caught up with the latest

Teaching IronPython D520: Week 6

Tony Andrew Meyer is teaching IronPython as course D520 ("Programming") at Northtec in New Zealand, using IronPython in Action as course material.  He's been posting regular updates on how the course is going, including his course notes. We last covered weeks four and five and now we're onto week 6. D520 – Week Six   Chapter 6 of IronPython in Action covers “properties, dialogs, and Visual Studio”.  This seemed an obvious place to insert the material on user-interface design that is normally covered in the course, and to look a bit more deeply than the textbook does at Visual Studio itself (and the Windows Forms controls and their properties).  I only scheduled a single week to cover this, but I suspected that it might take more than one (I left an empty slot in the schedule to cover one such over-run), and that was, indeed, the case.  The students received notes [PDF] , slightly longer this week (covering the UI design material not in the textbook, as well as

Gestalt and Python and Ruby in HTML Script Tags

Gestalt is a project that uses Silverlight to allow the browser to be scripted with Python and Ruby in exactly the same way as you script it with Javascript - using the HTML <script> tag. Jimmy Schementi has been working on the dynamic languages Silverlight integration, as outlined in his back to just text paper. He has begun the work he describes there and it is almost feature complete. It is all publicly accessible in a github repository ( download zip-file ). You can see it in action in some great examples of what is possible with gestalt (very pretty) in the samples that Jimmy has ported over: Gestalt-port pretty demos Jimmy is also looking for feedback on the code: Python and Ruby in HTML script-tags If you find any bugs, please report them on MY FORK's Issues tab (I wanted to use GitHub's issue tracking a little ... eventually I'll move them over to CodePlex when it gets checked in): http://github.com/jschementi/ironruby/issues I'd like feedba