Posts

Showing posts from 2009

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

A Good Mix 33: Embedding Python and Ruby, Profiling IronPython, News on JScript, ctypes and DeviantArt

More IronPython and DLR related projects, articles and news from around the web. Embedded IronRuby and IronPython in Silverlight with Multiple Source Files A  nice example of embedding both IronPython and IronRuby in a single C# project. As an added bonus the project is a Silverlight project so you can add both Python and Ruby scripting to applications that run in the browser. slimtune: A free profiling and performance tuning tool for .NET applications IronPython 2.6 has useful new hooks for profiling and debugging IronPython code. Unfortunately most 'standard' .NET tools don't know how to use these, and if you attempt to profile IronPython code (particularly in an embedded environment) you have to work hard to get useful information about performance of your Python code. It's nice to see a new (and open source) tool that is designed to work with IronPython: SlimTune is a free profiler and performance analysis/tuning tool for .NET based applications, including C#

Scripting Applications with IronPython (ADAM, Revit, AutoCAD & Postsharp)

IronPython and the Dynamic Language Runtime make it almost ridiculously easy to add scripting to .NET applications. In recent weeks several examples of using IronPython to add scripting or interactive shells to .NET applications have been posted by the .NET community: Command-line scripting of IronPython code in AutoCAD This post was heavily inspired by the code presented by my old friend Albert Szilvasy during his excellent AU class on using .NET 4.0 with AutoCAD . ... In this post we’ll take Albert’s technique and implement a command-line interface for querying and executing IronPython script. This approach could also be adapted to work with other DLR languages such as IronRuby, of course. Here’s the updated C# code which now not only implements PYLOAD functionality, but also a PYEXEC command.   Scriptability via the DLR and PostSharp  Making an application scriptable (particularly in a static language) has historically been difficult. With the advent of the DLR (Dynamic La

PythonSilverScripting: Silverlight apps in the browser with Python

Tarn Barford is an Australian blogger and programmer who uses IronPython. He's created a Google App Engine site for experimenting with IronPython in the browser (through Silverlight). PythonSilverScripting: Scripting Python Silverlight Applications PythonSilverScripting lowers the barriers to building Silverlight applications so anyone from high school kids to seasoned programmers can have fun writing Silverlight applications in Python from within a browser! Below is a simple script that creates a Silverlight application, sets the background blue and adds a TextBlock element with the text "Hello World". He's also blogged about the new site, including his future plans for it: Creating Silverlight apps in the browser PythonSilverScripting is based on crazy idea I have that it should be possible to make Silverlight applications in Python on the web. No tools, no SDKs.. just a browser (and obviously the Silverlight browser plug-in). I've played around a bit w

Why IronPython Podcast and Best of MSDN Ebook

I recently wrote an article for the UK MSDN (Microsoft Developer Network) newsletter called Why IronPython? This article made it into the collection of the thirteen best technical articles of 2009: You can download these articles as a free ebook in XPS or PDF format, or read it online: FREE MSDN Flash eBook of the best 13 technical articles of 2009 The UK MSDN Flash developer newsletter contains great short technical articles written by UK developers both inside Microsoft and in the broader developer community. This eBook pulls together these great articles in one place. There are thirteen articles in this second edition covering Python, Inversion of Control, Behavior Driven Development, Silverlight and more. The MSDN Flash newsletter is run by Eric Nelson. He also has a podcast and we recorded an episode together about Python, IronPython, PyCon and various other topics: MSDN Flash Podcast 018 – Michael Foord discusses IronPython A great chat with Michael Foord, author of IronP

Executing IronPython Code from IronRuby

The Dynamic Language Runtime is a framework for writing dynamic languages that run on the .NET framework, with the two "Microsoft sponsored" languages being IronPython and IronRuby. There is also IronScheme , a community project hosted on Codeplex. The promise of the DLR is not just that it makes implementing dynamic languages possible , but also that through the DLR .NET languages can interoperate. This includes IronPython and IronRuby (etc) interacting with C#, F# and VB.NET (the supported and statically typed Microsoft .NET languages) but also the reverse (statically typed languages interoperating with dynamically typed languages) and dynamically typed languages interoperating amongst themselves. All very incestuous. As far as I know this is still unique amongst the modern polyglot runtimes (.NET and Mono, the JVM, LLVM, Parrot and so on). Whilst IronRuby in particular has been changing very rapidly (IronRuby has only recently reached 1.0 RC 1) it has been hard to g

Why IronPython?

This is a short article I wrote for the UK MSDN Flash newsletter (a Microsoft newsletter for developers). Unfortunately the online versions of these newsletters aren't being updated at the moment; so instead of linking to it I'm reproducing it here. Why IronPython? One of the new features in .NET 4.0 is the dynamic keyword, building on the Dynamic Language Runtime. A major reason for dynamic is to enable easier interaction with dynamic languages like IronPython. But if you're a dyed in the wool C# or VB.NET programmer why should you be interested in IronPython? Much of the discussion here applies to other dynamic languages, including IronRuby, but Python is my particular area of expertise. IronPython is a .NET implementation of the popular open source programming language Python. Python is an expressive language that is easy to learn and supports several different programming styles; interactive, scripting, procedural, functional

IronPython gets a long overdue website!

Thanks to Jimmy Schementi (the new IronPython PM, Ruby lover and all round good guy) IronPython has a new website. And as said best on Reddit , it doesn't look like Microsoft made it. The site has links to documentation, community resources and online IronPython examples using Silverlight (including Try Python ). IronPython gets a long overdue website! IronPython.net CodePlex will continue to be the tool we use for project management and releases, but all end-user information will be on IronPython.net. Also, the .com domain still points at the super-old site, but will redirect to this site shortly. The most notably addition is the .NET Integration Documentation, a thorough set of examples and descriptions of using IronPython with .NET. Considering this is IronPython’s main purpose, it’s amazing we got away with having hardly no documentation for this long … I guess the .NET integration is just that intuitive :) Anyway, please give it a read and let us know if you have any sug

WCF Service in pure IronPython with config file

In previous blog entries Lukáš Čenovský looked into Databinding and WCF Services with IronPython 2.6 . This uses the new __clrtype__ feature in IronPython 2.6 to interact with .NET features that previously couldn't be done with IronPython. In this follow up blog entry Lukáš shows how to saved the IronPython interface in an assembly with a config file. WCF Service in pure IronPython with config file I was wrong when I wrote in the last post that the IronPython service cannot be saved into an assembly. It can. Which opens a way to use .config file to configure the service. The interface is the same as in the previous version. The only difference in the service to the previous version is in the ServiceHost initialization - we omit the service configuration parameters because they are in the .config file. I also changed the clr namespace.

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 Lightweight S

IronPython 2.6 Final Released

IronPython 2.6 is finally out! IronPython 2.6 is a new version of IronPython targeting compatibility with Python 2.6. As well as the new language and library features that come with Python 2.6, IronPython 2.6 has new features for improved performance, general Python compatibility and better .NET integration. It's a great release; congratulations and thanks to the IronPython team. Download IronPython 2.6 IronPython Samples for IronPython 2.6   Performance Comparison: IronPython 2.6 Final and CPython 2.6  IronPython 2.6 final is identical to release candidate 3. Features new to IronPython in version 2.6 include: 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 (and better debugging from the .NET side) Better performance through adaptive compilation Faster startup There are several changes to the samples in IronPython 2.6. These

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

Cheminformatics Tutorial Using Python and Silverlight

Try Python is an online interactive Python tutorial using IronPython and Silverlight. The source code is available and open source and the tutorial material is written in a subset of the ReStructured Text markup. Noel Baoilleach has taken this a step further by creating his own version, including the Webel library library and a tutorial on using it with interactive examples. Cheminformatics Tutorial using Python and Silverlight Try Python with Cheminformatics Tutorial Recently I introduced Webel, a Python cheminformatics module that runs entirely on web services. One of the advantages of such a module is that it can be used in places where it is difficult to install a traditional cheminformatics toolkit. Like in your browser. After some little work, I present Try Python...with Cheminformatics. This adds Webel as well as a short tutorial that introduces many of its features. With a few more tutorials that cover SMILES, InChI and so on in more detail, this could be useful for t

Hello GTK# from IronPython and F#

GTK# is a managed interface to the GTK user interface library. GTK# is part of the Mono project, but it can also be used from .NET on Windows. In this blog entry, another one from Steve Gilham, he illustrates using GTK# from both IronPython and C# by porting some C# examples. “Hello GTK#” from the latest IronPython and F# A little post to record a short bit of spiking with GTK# as UI toolkit, porting the simple C# examples from here to my preferred .net languages. Neither of these explorations are totally novel -- there are examples in either language to Google, but not all of them recorded all the details of the slight rough spots that needed a little working (and they were often not at all recent, either). For IronPython 2.6 latest with GTK# 2.12.9-2, running the programs as ipy Program.py . The dynamic nature of the language means we can lose a lot of the declaration clutter. We just have to explicitly reference the main GTK# assembly (which is GAC'd by the GTK# install

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

Face Detection with IronPython

Face detection in images is very cool (and perhaps a little bit scary), and with the help of Emgu CV it can be done from IronPython. Emgu CV is a cross platform .Net wrapper to the Intel OpenCV image processing library. Allowing OpenCV functions to be called from .NET compatible languages such as C#, VB, VC++, IronPython etc. The wrapper can be compiled in Mono and run on Linux / Mac OS X. This blog entry from Clark Updike shows how. Face Detection "Hello World" in IronPython using Emgu CV and OpenCV  A couple notes compared to the Emgu wiki version--I was able to get everything working without having to disturb the IronPython install (I didn't copy any files into the IronPython start directory). I simply linked used sys.path to add the locations where the dll's live. Also, I did explicit import for everything. It's a bit more work to figure out what needs to be imported, but it avoids namespace pollution issues. Also, the img.Draw line needed a few tweaks.

Databinding and WCF Services with IronPython 2.6

One of the important new features in IronPython 2.6 is the __clrtype__ metaclass.The __clrtype__ metaclass allows you to create a real .NET class that backs your Python classes. This is important because there are many .NET features that * require * a real .NET class: which includes databinding and implementing WCF services (Windows Communication Foundation). The problem with __clrtype__ is that it requires dealing with low level details; namely building the class yourself from IL bytecode. Harry Pierson and Shri Borde have been working on a library ( clrtype.py ) to make this simpler. Lukáš ÄŒenovský has looked at this before but hit limitations with what clrtype made possible. In three new blog entries he demonstrates how to use __clrtype__ with databinding in WPF and Silverlight and to implement WCF services. INotifyPropertyChanged and databinding in IronPython WPF   INotifyPropertyChanged is important interface for building WPF or Silverlight applications using M-V-VM

IronPython 2.6 Release Candidate 3

IronPython 2.6 is the up-and-coming version of IronPython targeting compatibility with Python 2.6. As well as the new features in Python 2.6, IronPython 2.6 has several important new features specific to IronPython. These include: 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 IronPython 2.6 Release Candidate 3 has just been released. The hope is that this will be the last release candidate before the final release: IronPython 2.6 Release Candidate 3 Release Notes and Download We’re pleased to announce the third and hopefully final release candidate of IronPython 2.6. Release Candidate 3 only includes Silverlight-related changes pertaining to some incompatibilities between 2.6 RC1 and RC2. Those who utilize IronPython for non-Silverlight scenarios will happily find virtu

Two Articles: IronPython 2.0 and WPF Error

Two more articles from Ibrahim Kivanc, the Turkish blogger who has written several articles on IronPython and Silverlight. Both of these articles are in English. IronPython 2.0 and Access to .NET Libraries IronPython 2.0 version now runs on DLR (Dynamic Language Runtime). DLR is a platform on .NET which is host Dynamicly typed languages on it. Now Dynamic Languages Communicate eachother and C#,VB, COM Objects, .NET Libraries. IronPython, with 2.0 version runs on DLR (Dynamic Language Runtime); it’s a platform like CLR architecture. It’s host for Dynamic Languages on .NET. With this architecture Dynamic Languages now faster then running on CLR and easily communicate with other .NET objects!   IronPython WPF Error In my opinion IronPython Studio is not stable enough for production use. It does have the advantage of being integrated in Visual Studio so some people can't resist trying it out. (You can read my write-up of IronPython Studio at: IronPython Tools and IDEs .) If y

Embedding IronPython in Silverlight - Importing

Jimmy Schementi is the Microsoft program manager for the integration of dynamic languages (IronPython and IronRuby) and the Silverlight browser plugin. As well as dynamic languages, Silverlight applications can be written in .NET languages like C# and VB.NET - and these languages can embed IronPython. Although embedding IronPython in a C# Silverlight application is initially straightforward (although a bit more verbose than embedding using the normal .NET framework / Mono as the ScriptRuntime needs to be configured), it gets painful fast. This is especially true when the Python code you execute needs to import anything, which has basically been broken on Silverlight for quite some time. In his latest blog entry Jimmy looks at how embedding from Silverlight has got simpler recently, and also at fixing the import problems. Embedding IronPython in Silverlight - Importing I’ve heard plenty of times on the IronPython Mailing List that embedding IronPython in Silverlight is easy at fi

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 I wo

IronPython at PyCon 2010

PyCon 2010 , the annual international Python conference is coming soon (February 17th 2010 in Atlanta US). The schedule of talks is now up, and as usual there are several IronPython related talks . 67. IronPython Tooling  By Dino Veihland, core IronPython developer: One of the most popular requests for the IronPython team is tooling support. During this talk I’ll show you some of the existing tools available to help create IronPython applications. I’ll also look at the latest IronPython features which can help you debug, profile and improve your applications. I’ll also compare and contrast these with the solutions available for CPython that you may already be familiar with. 71. Python in the Browser By Jimmy Schementi (Microsoft program manager for IronPython / IronRuby Silverlight integration): You write your server code in Python because you want to. You write your browser code in JavaScript because you have to. But with IronPython and Silverlight, you can write your browser c

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

Using Solver Foundation and plug-in solvers in IronPython

Microsoft Solver Foundation is a set of mathematical programming tools that can be used from .NET languages like C#, F# and IronPython: Solver Foundation Services (SFS) can automatically analyze models and determine which solver is most appropriate. If you are an advanced modeler, you can choose specific solvers and solver attributes. While solving the models, SFS manages all threading, many-core, synchronization, scheduling, and model execution issues. When finished, SFS produces reports about solver behavior and results, and provides additional information about solutions, including sensitivity. Finally, SFS allows LINQ data binding of model parameters and delivery of results in multiple formats. Lengning Liu has a blog entry on using the solver foundation from IronPython, including the magic incantations in app.config required to use plug in solvers. Using Solver Foundation and plug-in solvers in IronPython Solver Foundation provides an easy-to-use and flexible plug-in infras

Scripting Your .Net Applications with IronPython

One of the major use cases for IronPython is embedding in .NET applications to provide user scripting. The hosting APIs make it easy to experiment with embedding IronPython. Chris Umbel has written up a blog entry demonstrating the IronPython 2.6 hosting API and giving an example of exposing an API to Python scripts from a C# applications. Scripting Your .Net Applications with IronPython At several points in my .Net development career I've had the need to make an application I wrote scriptable. Sometimes it was to provide easy product extension to customers or lower level information workers. Sometimes it was to ease maintenance of very fine grained logic that has the capacity to change frequently or unpredictably. But every time I found it to be one of the more interesting facets of the project at hand. Early in .Net's history this was made easy by using Visual Studio for Applications (VSA) which allowed you to host arbitrary C# or VB.Net code within the executing AppDom

A WCF Service from IronPython

Windows Communication Foundation (WCF) is part of .NET 3 and makes creating and interacting with web services from C# substantially easier. WCF makes extensive use of .NET attributes, making it difficult to use from IronPython versions before 2.6 without wrapping the use of attributes in some C#. IronPython 2.6 brings in support for attributes through the __clrtype__ metaclass. It doesn't yet allow you to create a .NET interface from pure Python code (although you can implement existing interfaces just by inheriting from them), so * some * C# is still needed for full use of WCF with IronPython 2.6. The dynamic languages team are looking at ways that __clrtype__ could be extended to allow the creation of interfaces in a future release. In his latest blog post Lukáš Čenovský demonstrates how to create a WCF service from C# and then shows the same code from IronPython, along with the minimal C# still needed. A WCF Service from IronPython Until IronPython 2.6, it was not possi

Getting Started with IronPython and Embedding IronPython

Charlie Calvert is Community Program Manager for the C# group at Microsoft. He has posted a couple of blog entries on using IronPython. The first shows you how to get started with IronPython on Windows, including setting up your path to easily execute Python scripts with ipy.exe. The second entry shows how to execute a Python file from C# when embedding the IronPython engine. Getting Started with IronPython I recently spent some time getting IronPython up and running on my system; I will review what I learned in this post. Hosted inside an interpreter, Python belongs to the same family of scripting tools as VBScript, JavaScript, Perl and Ruby. You can fairly compare Python to a general purpose language such as C#. Developers praise this loosely typed, dynamic language for its ease of use and rapid development capabilities. IronPython is Microsoft’s free version of the open source Python language. IronPython can be hosted inside a C# program as a scripting language. Nonetheless,

Performance of IronPython vs. C#

The Loose XAML blog has posted an interesting article profiling some IronPython code and the semantically identical C# and C code (for generating the fibonnaci series). He comes to the unsurprising conclusion that C# is substantially faster, but digs deeper into the results to try and work out why. An interesting discussion ensues in the comments. Performance of IronPython vs. C#  I’ve been using IronPython for a while, and every now and then I do a cursory check to see how it’s performs against the equivalent C# code. C# is generally a touch faster at most logic, but IronPython is faster at dynamic invocation of methods than reflection in C#. In general it’s a wash…over the course of an application you dabble in things that different languages are better optimized to handle. When performance is a wash, you get the freedom to choose entirely based on the features of each language, which is nice. This was going well, until I had a need to do some recursion. I found that the recursiv

Talking to ActiveDirectory from (Iron)Python

Active directory is one of the standard (and important) parts of a Windows network. Working with active directory is therefore a common task for a Windows system administrator. Naturally you can work with active directory from Python , but there is also good support for active directory in the .NET framework that can be accessed from IronPython (including from IronPython on Mono). This is something that Brendan McAdams has been exploring on the Evil Monkey Labs blog and has created a utility module to make it even easier: Talking to ActiveDirectory from (Iron)Python ad_util.py on github  We're building a new intranet system at work, and I've been toying with a few things that the Windows admin asked for. Namely, since the secretaries here will update the intranet data to add people's Work & Emergency contact numbers, AIM handles, email addresses, etc. that we find a way to keep it all in sync with ActiveDirectory. Thereby keeping all the Outlooks and Blackberries up