Posts

A Good Mix 36: Jim Hugunin, Selenium Two, Embedding IronPython & IronPython with Expression Blend

Another collection of IronPython and DLR related articles from recent weeks. Jim Hugunin: Modelling the World Jim Hugunin is a bit of a Python veteran. As well as being the creator of two implementations of Python (Jython and IronPython), he also started the Numpy project (back when it was called Numeric). Not long ago he was swallowed by Microsoft, who also took on the development of IronPython and turning it into the Dynamic Language Runtime. In this video interview Jim explains not only how he got involved in Python, but also what he has been up to recently. IronPython Tools for Visual Studio with Expression Blend One of the ways that .NET helps you separate your visual design from your application logic is through XAML; an XML based declarative language that can be used with both Windows Presentation Foundation (WPF) and Silverlight. Naturally there are design tools that will generate XAML. Visual Studio is one of them, but the best one is Expression Blend. XAML has features...

MonoDroid: IronPython on Android?

MonoTouch is a cross-compiler IDE and toolchain for the iPhone OS series. It allows you to write iPhone / iPod Touch / iPad applications with .NET languages like C# and take advantage of nice features of the .NET framework (actually Mono) like the extensive class libraries, proper garbage collection and so on. Because of the rules against interpreters and code generators MonoTouch didn't include the System.Reflection.Emit apis that are needed for Dynamic Language Runtime languages like IronPython and IronRuby. Despite this restriction  MonoTouch was a victim of the controversial Section 3.3.1 of the iPhone developer agreement that requires iPhone apps to be written in objective-C, C or C++. (Modern developers who prefer the reliability of garbage collection based languages need not apply...) Apple's main goal seems to be sticking two fingers up to Adobe and banning their Flash cross compiler, but other tools like MonoTouch are collateral damage. If there was ever any dou...

adodbapi 2.3.0 (the django version) released

Vernon Cole has announced the release of a new version of adodbapi, a Windows database driver that works with both CPython and IronPython.   This version is all about django support.  There are two targets:     A) MS SQL database connections for mainstream django.     B) running django on IronPython    Thanks to Adam Vandenberg for the django modifications. adodbapi home page on sourceforge A Python DB-API 2.0 module that makes it easy to use Microsoft ADO for connecting with databases and other data sources using either CPython or IronPython. This version is highly refactored following the work of Adam Vandenberg, and also has all of the current user suggested patches. Both the Mercurial tree and the downloadable zip files are updated.  (There is no fancy installer, just copy the folder in your site-packages folder.) This has been tested using CPython 2.3, CPython 2.6, IronPython 2.6 (.NET 2) and IronPython 2.6(.NET 4...

SQLite, zlib and XNA

Image
Jeff Hardy has been at it again, and has just done releases of both IronPython.SQLite and IronPython.Zlib - ports of the Python zlib and pysqlite modules to IronPython. IronPython: SQLite and Zlib IronPython.Zlib  implements the zlib module for IronPython using ComponentAce’s zlib.net, which is a purely managed implementation of the zlib library. IronPython.Zlib is entirely managed code and works with both 32-bit and 64-bit IronPython. It passes all of the Python 2.6 zlib and gzip tests and most of the zipfile tests. IronPython.SQLite is a port of pysqlite to IronPython using C#-SQLite, which, similar to zlib.net, is a managed implementation of SQLite. Thus, IronPython.SQLite is also 100% managed code. It passes about 87% of the Python 2.6 sqlite3 tests; the remaining ones are mostly corner cases or rarely used functionality. Carl Trachte also emailed me about a Japanese blog post on using XNA with IronPython. XNA is the Microsoft game creation framework that runs on the XBox...

IronPython Tools for Visual Studio

Image
Visual Studio is the Microsoft IDE for Windows and is virtually ubiquitous as a Windows development tool. Unfortunately Visual Studio has never had good support for languages like Python, which became more of a problem for Microsoft when they developed and released a distribution of Python themselves (IronPython). Whilst there have been many good IDEs  with IronPython support there has until now been lacking from Visual Studio - and adding support has been the highest voted Visual Studio feature request for some time. Adding good support for a dynamic language to an IDE is very different from supporting statically typed languages. The internals of Visual Studio rely on the static type information for the intellisense, designers, refactoring and so on. However, the IronPython team themselves have come to the rescue and built IronPython integration into Visual Studio 2010: IronPython Tools for Visual Studio We are happy to announce the first broadly available release of Iron...

Updated Dynamic Languages in Silverlight Page

Silverlight is the Microsoft browser plugin that, amongst other things, allows you to run Python and Ruby in the browser with full access to the browser DOM. This is all through the magic of the Dynamic Language Runtime. With either Silverlight or Moonlight installed, the simplest DLR-based application can be contained in a single HTML file:     <script src="http://gestalt.ironruby.net/dlr-latest.js" type="text/javascript"> </script>     <script type="text/ruby"> window.alert "Ruby in the browser!" </script>     <script type="text/python"> window.Alert("Python works too!") </script> The introduction page on the silverlight.net site has now been updated. Dynamic Languages in Silverlight Writing Silverlight applications in Ruby, Python, and other DLR-based languages only requires a local web server, a text editor, and a browser which supports Silverlight on Windows or Mac OS ,...

IronPython in PyCharm, a new Python IDE

Image
PyCharm is a new Python IDE from the JetBrains team, still available only as an "early preview" (beta planned this summer). As well as the "usual features" for Python IDEs (debugger, syntax highlighting, projects and code navigation, code completion, testing and version control integration, etc) it has some nice features like django support, Python refactoring and support for IronPython. Some of the details of the IronPython support are on the PyCharm blog: PyCharm build 96.115 is available IronPython support . It includes the possibility to generate Python stubs for .NET assemblies, but for performance reasons the generation isn’t performed on project opening and needs to be triggered manually (press Alt-Enter on an import statement). This will allow for code-completion (intellisense) to work for IronPython code in the PyCharm IDE. 

A Good Mix 35: Visual Studio, WPF, a cross-platform Resolver One and IronJS (A DLR based Javascript)

Image
Another collection of IronPython and DLR related articles from recent weeks. Visual Studio 2010 Extension: IronPython IronRuby Console This extension adds IronPython and IronRuby to PowerConsole  so that you can interact with Visual Studio in IronPython/IronRuby. Please be aware that this extension only provides a simple tool to explore and interact with VS itself. It does not aim to be a development experience for the included languages. Tinesware: EasyWPF 0.3.93 An IronPython GUI library compatible with the Python GUI library EasyGUI . As the name implies, it is built on the WPF GUI library (making it Windows only). Like EasyGUI it has a demo app when you run the file showing the different controls/widgets the library supports. For more examples of how to use it visit the EasyGUI tutorial . Preview of the New Grid in Resolver One Resolver One  is a programmable spreadsheet written in IronPython. As well as being extremely powerful Resolver One is the largest ...

IronPython y SharpDevelop, en español (IronPython and SharpDevelop in Spanish)

A guide to using IronPython with the SharpDevelop IDE translated into Spanish. SharpDevelop is a .NET IDE for Windows. Of all the major .NET IDEs it has the best support for IronPython. IronPython y SharpDevelop, en español Hola. En este post vamos a hablar un poco del hermano de Python (ó CPython) para la plataforma de desarrollo de Microsoft .NET, IronPython. Como he comentado a lo largo de la vida de este blog, alguien que se quiera dedicar a esta bendita profesión no puede estar ajeno a las combulsiones que se originan en este mundo. Si alguien no se había enterado (que creo que no) Microsoft ha lanzado una nueva versión de su archiconocido Visual Studio, versión 2010, junto con la plataforma de desarrollo Framework .NET 4.0. Según parece en esta versión se le empieza a dar una mayor importancia a lenguajes dinámicos, como IronPython. Y es por ello que me he decicido a investigar este territorio, tan inóspito para mí. Y es que aprender nunca pasa de moda. Decir que IronPython e...

IronPython 2.6.1 Released

There have been three "IronPython relevant" releases in the last twenty four hours with another one to come. IronPython 2.6.1 (for .NET 2 and .NET 4) .NET 4.0 Visual Studio 2010 The next release is Silverlight 4, which includes new features like out-of-browser support, new controls (a rich text editor component), web cam and printing support and lots more. For those who still aren't aware, Silverlight is a browser plugin that works with Windows and Mac OS X and in IE, Safari, Firefox and Chrome browsers. There is an official port from the Mono team, called Moonlight, that works with Linux and Firefox. .NET 4.0 is the version of the .NET framework (and C# language) that includes support for the dynamic keyword - allowing for dynamic typing in C# and easier interoperation between C# and dynamic languages. IronPython 2.6.1 is the latest stable release of IronPython. Despite being a minor point release there are some very nice improvements and new features. Headline ...

Professional IronPython

Professional IronPython is a new book on IronPython, published by Wrox and written by John Meuller  (who has apparently written 73 books). Create applications that are more responsive to user needs IronPython should be an important part of your developer's toolbox and this book will quickly get you up and running with this powerful language. John Paul Mueller clearly shows how IronPython can help you create better desktop or web-based applications in less time and with fewer errors. Throughout the pages, you'll find techniques for extending IronPython and making it a more robust language. In addition, you'll follow advanced steps such as building an IronPython extension that directly accesses the Win32 API. And you'll enhance your skill set as you introduce IronPython into other environments such as Linux® and Mac OS® X.       Professional IronPython is the third book on IronPython, with the first two being IronPython in Action and Pro IronPython...

SharpDevelop 3.2 RC1 - with support for IronPython 2.6.1 RC1

IronPython 2.6.1 will bring some nice performance improvements and some big Unicode compatibility improvements to IronPython 2.6. The release candidate of SharpDevelop (Windows IDE with superlative support for IronPython) includes support for the IronPython 2.6.1 release candidate. SharpDevelop 3.2 RC 1 The first release candidate for SharpDevelop 3.2 comes with updated language support, fixes to various features (eg C# <-> VB.NET conversion), as well as improvements you have asked for in our forums. The highlights: IronRuby 1.0 RC2 support IronPython 2.6.1 RC1 support Microsoft F#, February 2010 CTP support SHFB 1.8.0.3 support SDR: Absolute and relative filenames for images SDR: Zoom in Report Viewer

Python in the Browser, IronPython in Visual Studio 2010 and Other PyCon Talks

PyCon 2010 was great fun, and included several talks on or including IronPython. Python in the Browser This is Jimmy Schementi's write-up of his talk on using Python in the Browser, with links to the video and slides: You, the Python developer, use Python because you want to, but in the browser you use JavaScript because you think you have to. With IronPython you can write browser code in Python. I’ll only begin to answer "what can the browser bring to Python?" and "what can Python bring to the browser?" in this short overview; examples will be very simple (with the exception of a few flashy ones) to make sure you can get started immediately. IronPython Tooling The video of Dino Veihland's talk on the new integration of IronPython with Visual Studio 2010. The integration, which works standalone with the Visual Studio extensibility shell or integrated into VS 2010, is alpha quality - but has lots of nice features for IronPython development. It includes...

Catching up with Jeff Hardy and Django on IronPython

Jeff Hardy is an IronPython MVP and a Python community member who has invested a lot of time in getting standard Python libraries available for IronPython. Some of his recent work has been with both Django and the zlib module . It's been a while since we've reported on his work, so this post gets us up to date with what Jeff has been working on: IronPython.Zlib The zlib module is a C extension for Python. Because it is in the Python standard library it is used by many other libraries, like setuptools, making it an important part of the Python infrastructure. Unfortunately not all of the standard library C extensions have been ported to IronPython. The problem of C extensions is one of the major drawbacks of alternative implementations of Python; both Jython and PyPy have the same problem. Even if your code is 'pure-Python' it may not run on alternative implementations if it uses C extensions. For IronPython one solution is to use Ironclad , an open source project cr...

Acceptance Testing .NET Applications using IronPython

This article, written by Jonathan Hartley, was originally published in the Python Magazine. Acceptance Testing .NET Applications using IronPython Unit tests demonstrate to developers that individual functions and classes work as expected. Acceptance tests are an orthogonal complement to this. They verify to everybody, including managers and clients, that features they understand and care about are completed and working correctly. They also prove that the system as a whole is correctly integrated and that no regressions have occurred. Resolver Systems is developing a .NET desktop spreadsheet application, Resolver One, for which we have accumulated an acceptance testing framework. This framework uses Python’s standard unittest module, and is executed using IronPython. While Resolver One is written in IronPython, this technique allows IronPython tests to interact with product code written in any .NET language. This article describes the principles of this IronPython acceptance test...

IronPython in Action: Manning Deal of the Day

March 9th (that's tomorrow at the time of typing) IronPython in Action is the Manning deal of the day. This is a one day offer with a special discount. You can get the discount by buying IronPython in Action from the Manning website and using the discount code dotd0310tw. It isn't only IronPython in Action that is on offer, you can also get Quick Python by Vern Ceder.

Most Popular Articles of 2009

 In 2009 I made 312 posts on IronPython-URLs, a bit short of an average of one a day that it looked like I might manage earlier in the year. According to google analytics there were more than 112 thousand page views to a total of 2042 pages on the blog. An average of over three hundred page views a day. Feedburner estimates that this blog has around eight hundred readers. Many of those will read the articles via RSS or Planet Python and rarely visit the website. It's interesting to note that of the most popular articles in 2009 (most page views) several of them are to do with choice of IDE or using IronPython with Visual Studio. The question of which IDE to use with IronPython is still alive and well: New Sample: Writing a DLR Language in C# or IronPython   (May 2009, 1892 page views) IronPython in SharpDevelop 3.1 and Converting C# to IronPython   (May 2009, 1412 page views) C# Becomes a Dynamic Language...   (December 2008, 1164 page views) Python is the ...

A Good Mix 34: Silverlight Logging, WPF and NotifyIcon, more Python and Ruby and pickling Python books

Another collection of IronPython and DLR related articles from around the web. A fine way to end 2009. SLog: Silverlight Logging A nascent project to Port Log(4|5)J from Java to C# with the goal of usefulness in Silverlight, especially for IronPython. A WPF Picture Viewer NotifyIcon to use from IronPython  Two Japanese blog entries, both by sasakima-nao. As with previous entries the code examples are very readable. The first is a simple WPF picture viewer (nice penguins) and the second shows how to create a NotifyIcon and ContextMenu in the taskbar (with Windows Forms classes). Python-Ruby (and a little bit of soap) This blog entry is in Russian, but I think there are enough code examples for it to be useful for those of us who don't speak Russian. As I've mentioned before the promise of the Dynamic Language Runtime is that dynamic languages can interoperate and share libraries. This is exactly what this blog entry shows: using the Ruby soap/wsdlDriver from Python. ...

Does Microsoft take Dynamic Languages Seriously?

My belief is that the answer to the question in the title of this entry is an emphatic yes. Microsoft have poured a lot of money into IronPython, IronRuby and the Dynamic Language Runtime and have demonstrated a consistent commitment since the inception of IronPython. What they haven't done is build full support into their premier development tool, Visual Studio. The reason for this is that it is a very difficult problem. Visual Studio is built around statically typed languages. Features like intellisense, refactoring and code navigation all rely on having type information which is absent in languages like Python and Ruby. (The way they are implemented in Visual Studio requires that information I mean.) What Microsoft have done is provide example integration in the form of IronPython Studio, which frankly sucks . Many important features are fragile, broken or missing altogether. Good IDEs like PyDev and Wing do provide these features, so it is definitely possible - it just requi...

Ironclad 2.6 and Spare Batteries for IronPython

Ironclad is a compatibility layer that allows you to use Python C extensions with IronPython. Ironclad is open source and development has been funded by Resolver Systems and it is integrated into Resolver One to allow you to use Numpy within Resolver One spreadsheets . Ironclad works by implementing the Python C API in a combination of C#, C and Python. Although Ironclad only works on 32 bit Windows at the moment the implementation has been done in such a way that porting it to run on other platforms (with Mono) and 64 bit would be relatively easy. Patches welcomed! Recent development has changed the implementation to use gcc-xml to access and transform the Python C source code. By reusing as much of the original implementation as possible it minimizes the amount that needs to be 'hand-coded'. It leaves only a (moderately) small core that would need to be reimplemented if Jython, PyPy (or other implementations) wanted to reuse Ironclad. The C# would need to be re-coded ...