Posts

Showing posts with the label project

NWSGI 2 RC 2 and IronPython Extensions for Visual Studio 2010

Jeff Hardy is a big cheese in the IronPython world. One of his older projects is NWSGI, an implementation of the Python WSGI (Web Server Gateway Interface) specification for .NET. This allows Python WSGI applications to run on IronPython and be served by IIS. One of his newer projects is an extension of Visual Studio 2010 (still in beta) to provide Python syntax highlighting and IronPython support. Jeff has recently announced progress in both projects. NWSGI 2.0 Release Candidate 2   The final release candidate of NWSGI 2.0 is now available. Except for version numbers, this is what will become NWSGI 2.0 as soon as IronPython 2.6 is released. NWSGI 2.0 Release Candidate 2 includes all of the features of NWSGI 2.0 Release Candidate 1, and adds support configuring tracing, lightweight scopes, and the profiler. It is built against IronPython 2.6 RC3. The following issues are fixed in this release: Add configuration option for Profiler Add configuration option for Lightweig...

Gestalt 1.0 and the Gestalt Widget Pack

Gestalt is a project by Mix Online to use Silverlight and the Dynamic Language Runtime to allow you to script web pages with Python or Ruby instead of with Javascript. The Gestalt Project DLR.js is a library released by a collaborative effort between the Dynamic Language Runtime team and MIX Online Labs. This JavaScript library allows you to write Ruby, Python & XAML code in your (X)HTML pages. It enables you to build richer and more powerful web applications by marrying the benefits of expressive languages, modern compilers, AJAX & RIAs with the write » save » refresh development model of the web.  Gestalt has reached a significant milestone with the release of version 1.0 and a widget pack. It has matured to the point where you can do really crazy things like run Rails *in your browser*. Probably not specifically useful, but it shows what it is capable of: Introducing Gestalt 1.0 and the Gestalt Widget Pack A few months ago, we released Gestalt beta as a MIX Online ...

A Good Mix 32: Alpha Encoding Files, Embedding IronPython in Russian, IronSharePoint, IronRuby, World's Worst Paint Program

More IronPython and DLR related projects, articles and news from around the web. Alpha-encoding file versions  Steve Gilham shows how to generated encoded version strings for installers using IronPython: When building installers the UpgradeVersion must have a unique property value that is an installer public property (upper-case alpha). So, what better way of adding uniqueness than making it have the form "product name + product version" with the version suitably encoded... So, a script for turning a file version (4 x 16bit ints) encoded as a System.Version into a short alpha string, assuming that Major and Minor will be small, and that common approaches are to step Build, to use a stepped Build plus date-stamped Revision, or a timestamp Build and Revision. C# + IronPython: вызов методов An article on IronPython, and in particular using IronPython from C#, in Russian. IronSharePoint Source Code Available   A while ago Christian Glessner announced the start of the I...

A Good Mix 31: Texas Holdem, IronScheme, Indigo Cheminformatics, IronRuby and bridge xml

More IronPython and DLR related projects, articles and news from around the web. Texas Holdem Hand Equity Calculation in IronPython  Greg Bray has been experimenting with using Resolver One to write Texas Holdem calculating spreadsheets with IronPython. In this blog entry he shows the IronPython code for calculating hand equity: This year I have been working in my free time to create easy to use Texas Holdem poker spreadsheets based on IronPython using Resolver One. These spreadsheets can be used to calculate Win/Tie/Loss odds, but some people like to use hand equity instead since it represents a player’s overall stake in the pot. Equity of 1.0 or 100% means that they will win the entire pot, where as equity of 0.5 (50%) or 0.25 (25%) means that they will split the pot with other players. You can again use Monte Carlo analysis to run a number of trials before all of the board cards are dealt to estimate a player’s current equity in the hand. This means that if during 4 trials ...

A Good Mix 30: Visual Studio 2010, DevDays, Detecting 64 bit, Silverlight and Django

More IronPython and DLR related projects, articles and news from around the web. IronPython in Visual Studio 2010 Screenshot of syntax highlighting  Visual Studio 2010 doesn't come with IronPython support out of the box, but it does have extensive APIs for writing your own extensions. Jeff Hardy has taken up the challenge and has written a set of IronPython extensions for Visual Studio 2010 with syntax highlighting, regions etc. The project has binaries available : " Just double click the .vsix file to install. " StackOverflow DevDays Cambridge Review Diary of a schwag hag Cambridge Stack Overflow Dev Days At the end of October I attended the StackOverflow DevDays in Cambridge UK and spoke on Python and IronPython. I demonstrated .NET integration with IronPython by creating a simple Windows Forms application at the interactive interpreter. This was followed by going through Peter Norvig's Python Spell Checker as an example of concise Python code. Thanks to Ne...

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...

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...

New Release of VisioAutomation library

Microsoft Visio is a popular vector diagramming programming for Windows. As with other Microsoft programs it can be automated and extended with COM, which can easily be done from .NET languages like C# and IronPython. VisioAutomation is " a .NET Library that simplifies automating Visio from .NET languages such as C#, F#, IronPython and a set of tools that use that library. " It is useful for: Writing managed-code Add-Ins for Visio 2007 Writing tools to automate Visio 2007 from command line Use it as a reference to learn how to do common Visio automation tasks Version 2 of VisioAutomation has just been released. As well as various tools and libraries the latest version includes an experimental interactive environment built on IronPython and libraries to support using VisioAutomation from IronPython. Releasing a new version of my VisioAutomation library (version 2.0.0) Today I’m releasing the latest version of the VisioAutomation library on CodePlex: http://visioauto...

A Good Mix 23: IronPython 2.0.3, Eclipse 3.5, a WPF Hyperlink, dynamic in C#, MathNet and more...

Another collection of blog entries and articles related to IronPython and the Dynamic Language Runtime. IronPython 2.0.3 Must Fix Bugs With IronPython 2.6 Release Candidate 1 out of the door you might think that IronPython 2.0 was already defunct. Not true! David DiCato, an IronPython core developer, just posted to the IronPython mailing list asking what bugs people would like to see fixed in a 2.0.3 release: As we work towards our IronPython 2.0.3 bugfix release, Dino and I would like to get a feel for which bugs left unresolved in 2.0.2 are most important for us to fix in the next release. Please let us know ASAP if there’s an issue you’d like to see fixed in IronPython 2.0.3. Thanks! IronPython unter Eclipse 3.5 mit PyDev - Veni, vidi, vici  A blog entry (in German with just a hint of Latin) from Rainer Schuster about how he bent Eclipse 3.5 (with PyDev ) to his will for IronPython development. Google translate reveals his conclusion: From now on you is CodeCompletition ...

Blaze: Automated Desktop Experience

According to its homepage, " Blaze is an innovative utility designed to automate most of the unique recurrent tasks that arise from everyday usage. Such tasks can be launching applications, making small calculations, sending emails, inserting recurrent excerpts of text or even renaming files! " Blaze is Windows only and embeds IronPython for user scripting. It is open source, and the latest release is from Friday (September 18th) so it is under active development. Blaze is available as an installer or a portable version that can be used without installing. Blaze: Automated Desktop Experience There isn't yet a manual for developers. However, it's pretty easy to extend Blazes functionality with IronPython. Take a look on Scripts Folder. There are already two scripts build in which you can get inspiration from. To use the ContextLib, there is an outadated .chm file in Blaze's instalaction directory, in the "Docs" folder. It should work just fine for m...

Using IronPython to Configure Castle Windsor

This is part 3 of a series of articles, by Moukarram Kabbash, on configuring the Castle Windsor Inversion of Control container for .NET with IronPython. We previously covered the first two articles in the series. Using IronPython to configure Castle Windsor III In the first two articles I introduced Pysor, the Castle Windsor configuration tool using IronPython. Now I have added some exciting functions to exploit the nice hash table and list syntax feature in IronPython. Since the second part of this series is possible to add (named) parameters to component registration. It accepted only both literal and referential scalars. In the current revision you can exploit the nice list syntax of Python using the square brackets to add arrays and list parameters. The configuration project is called Pysor and is available for download from Github: Pysor: A tool to configure Castle Windsor using IronPython   The updated to-do list is now Adding a nicer API for referencing assemblies ...

Using IronPython to Configure Castle Windsor

Castle Windsor is a popular .NET Inversion of Control container, but it can be complex to configure. A blogger, who's name I can't discover (put your name on your blogs guys!), has written two articles on using IronPython to configure Castle Windsor. Using IronPython to configure Castle Windsor I Castle Windsor is a very popular IoC container in the .Net world. Like almost all other containers it can be configured using either a fluent interface or an xml-based configuration file. The fluent interface has the advantage of being strongly typed, what spares you a lot of errors caused by typos. On the other hand, it is hard coded and can’t be changed easily without recompiling (Actually you could use an IoC container to load your IoC container configuration dynamically but it give a rise to the question: “How do you configure the container to load its own configuration?” ) The other option is to use an xml file. Despite being the most used solution in almost all containers it is...

A Good Mix 19: Reflection, the Silverlight Toolkit, Dynamic JSON, libraries, builds and more

A collection of blog entries and articles on IronPython and the Dynamic Language Runtime from the last few weeks. Speed Test: Reflection vs IronPython Randall Sutton was using reflection to apply rules to an object when he realised he could do it with IronPython, but he was worried about performance. He wrote a quick test to compare the performance and was surprised by the results. The first run was very expensive for IronPython, but from there on in IronPython was much faster than C#. Without expending any effort actually working it out, my guess is that because IronPython uses reflection so heavily it caches the reflection lookups - and it is this caching that is giving it the performance benefit. Reflection on .NET is not fast, by any stretch of the imagination, and improving the performance of reflection would make a big difference to speeding up DLR languages. The Silverlight Toolkit and the Dynamic Language Console The Silverlight Toolkit is an open source project by Microsoft ...

Jeff Hardy: Python compatibility projects and NWSGI release

Jeff Hardy is an extremely prolific developer who has been involved in IronPython for a long time. By testing large Python frameworks and libraries with IronPython he has reported many bugs to the IronPython team. As part of this Jeff Hardy has accumulated repositories of more than a dozen different projects that he has been porting to IronPython. As you can imagine this is a lot of work and he is offering the opportunity for anyone else interested in these projects to take them on: Biting Off More Than I Can Chew I was going through the “Repositories” folder on my machine, looking at all of the stuff I’ve downloaded since, well, the last time I went through this exercise. This time around, a lot of it is stuff I’ve tried to get working on IronPython. Here’s a sampling: Django setuptools Trac Genshi Mercurial SCons CherryPy docutils moin pygments pymarkdown nose sqlalchemy IronRubyMVC On top of that, there’s the stuff I wrote: NWSGI , IronPython.Zlib , adonet-dbapi , and more . The goo...

A Good Mix 17: MUD, the Python for .NET that never was, Intellisense for IronPython, SciPy and Silverlight

Yet another selection of articles and projects on IronPython and the Dynamic Language Runtime from around the web. chiroptera This is the gitorious project page for a C# project: Chiroptera is a MUD client written in C# and uses IronPython as a scripting language. It runs on Windows and on Linux. Windows version has a graphical user interface. Linux version has a text interface with 256 color support. Charming Python: Inside JPython and Python for .NET Back way in the past, before 1.0, there was a previous Microsoft project to bring Python to the .NET framework. Unfortunately .NET pre-1.0 wasn't a good platform for dynamic languages and the project was never released. This article (from December 2000) is an interview with Mark Hammond who was the programmer on the project. Mark Hammond is familiar to most Python programmers because of his excellent development of the PythonWin environment and the PythonCOM extensions. And for the same reasons that we look up to Mark, Microsoft als...

Microsoft.Scripting.Debugging

For IronPython users interested in tool support the big new feature in IronPython 2.6 is the support for Python stack frames and all that comes along with it. Not a small part of this is that pdb , the standard library Python debugger, will work with IronPython - yay! Harry Pierson (IronPython program manager for Microsoft) has a new blog entry detailing the new assembly that will come with IronPython 2.6 (but will actually be part of the Dynamic Language Runtime) to support this: Microsoft.Scripting.Debugging If you’ve compiled IronPython from source recently, you may have noticed a new DLL: Microsoft.Scripting.Debugging. This DLL contains a lightweight, non-blocking debugger for DLR based languages that is going to enable both new scenarios as well as better compatibility with CPython. Needless to say, we’re very excited about it. ... Of course, we hide all this DLR Debugger goo from you in IronPython. Python already has a mechanism for doing traceback debugging – sys.settrace . Our ...

Simon Segal: A WPF IronPython REPL and messaging with NServiceBus

Simon Segal has been building an Entity Framework tool with built-in IronPython scripting support. Part of this has involved creating quite a fully fledged interactive Python interpreter as a WPF GUI component. This turns out to be quite a useful tool on its own. An IronPython REPL Console in a WPF User Control So to move forward with the WPF user control console project I decided to refactor it to support IronPython. Mark has jumped in just recently and started to contribute by adding the new “cached commands”, which offer up / down arrow repeat command behaviour such as found on a DOS console. You will also notice from the screenshot above I have imported the entire System namespace to demonstrate that it is possible (using the environment menu) to print the entire state of the default scopes current set of variables. Configuring, Testing and Probing NServiceBus with IronPython I have recently been working with NServiceBus quite a bit and whilst I was working on a WPF IronPython Co...

NWSGI: Configuration and Dispatching

NWSGI , as I may have mentioned before, is the creation of Jeff Hardy and is " a .NET implementation of the Python WSGI specification for IronPython. It is implemented as an ASP.NET HttpHandler for use with IIS 6 and 7 ". The goal is to be able to run Python applications like Django, Trac and Pylons on IronPython. It can also be used on the Microsoft Azure (cloud computing) platform. Version 2 is now in beta , and with it come several important changes. In a series of blog entries Jeff has been explaining these changes; and these four entries focus on configuring and dispatching. NWSGI 2.0: Configuration Details For the most part, NWSGI can be used without any configuration. All you have to do is create a .wsgi file, throw it in a directory, let IIS know what’s going on, and you’re good to go! Of course, if it was always that easy, configuration wouldn’t exist. To really work with NWSGI, you need to understand its configuration. It helps if you’re already familiar with web.co...

NWSGI: New release and big improvements

NWSGI is " a .NET implementation of the Python WSGI specification for IronPython. It is implemented as an ASP.NET HttpHandler for use with IIS 6 and 7 " created by Jeff Hardy. The goal is to be able to run Python applications like Django, Trac and Pylons on IronPython. It can also be used on the Microsoft Azure (cloud computing) platform. Jeff Hardy has just released a beta of version 2.0, and explained the new features: NWSGI 2.0 Beta 1 This is a major update to NWSGI that makes it easier to install and use and dramatically improves the management story. So, what happened to 1.1? Originally, NWSGI 1.1 was going to be a refresh of v1.0 that supported IronPython 2.6 and fixed a few bugs. NWSGI 2.0 was going to completely overhaul large parts of the management UI and make some deeper changes to the handler itself. However, I got a week off with some rain and v2.0 progressed much quicker than expected; v1.1 was obsolete before it was even released. So, v1.1 was dropped and v2.0...

Running KirbyBase in IronPython

KirbyBase has a small but warm place in my heart as the first database I ever used in an application. It is a pure-Python single module database that stores its data in plain-text delimited files and has a Pythonic query syntax. Sure you don't want to run a high volume website with it but it is fun to use and experiment with. Krishna Bhargav has been using it from IronPython and has written up a blog entry on how to get it working with IronPython 2.6: Running KirbyBase in IronPython As I was looking for embedded database systems, I came across this pure python database called KirbyBase. So I decided that I would make it run on IronPython. So this post describes on how to make KirbyBase run on IronPython and using ipy.exe. Note that I am not looking at integrating this database into C# application yet. [may be in the future post] Using Python libraries from C# is an interesting topic (covered briefly in IronPython in Action of course) which I don't think enough people have exp...