Posts

Showing posts from September, 2009

O2: 'Open Platform for automating application security knowledge and workflows'

Dinis Cruz is a Web Application Security expert and is the chief technology evangelist for the Open Web Application Security Project ( OWASP ). Dinis has been blogging about an " open source project designed to improve the productivity and capabilities of security consultants who perform application security engagements ". This project support Python on the JVM through Jython and Python on .NET through IronPython. O2: 'Open Platform for automating application security knowledge and workflows'  In a nutshell, O2 is a bunch of (about 25) open source modules/tools that help with the multiple aspects of performing application security engagement (in most cases by extending the capabilities of a several Commercial and Open Source tools). There is a large number of O2 modules that are designed to work specifically with the Ounce 6.x product (Ounce Labs Static Analysis engine), and several other O2 modules which are 100% independent and can be used using only freely

Configuration with IronPython

Mark Bloodworth is an architect evangelist who has blogged several times about IronPython. He has put up two more blog entries on using IronPython as a configuration engine. Configuration with IronPython   Configuring applications in code seems like a good idea.  Configuring them in code written in a dynamic language seems even better.  Let’s look at a simple example with IronPython. ... What next? I’ve kept this example as simple as possible to show the principles.  The advantages of using Python code (it would be simple to use IronRuby, too) are that it’s simpler to write, testable, more powerful and doesn’t need pre-compiling.  And it could do much more than set a couple of properties.  In C# 4.0 the dynamic keyword would allow the Configuration class (and classes like it) to be dynamic, so that the properties and methods could be referenced at runtime without having to be declared ahead of time. Simple Configuration with IronPython and .NET 4 Recently I posted a short a

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 Simple IronPython ActionFilter for ASP.NET MVC

ASP.NET MVC is the all new web framework for .NET inspired by frameworks like Rails and Django. There are a few examples of IronPython and IronRuby integration with ASP.NET MVC but the dynamic languages support is incomplete. Harry Pierson has blogged about at least one of the problems . Despite this there are various places where IronPython can be integrated with ASP.NET MVC, as demonstrated by a new article (with example code for download) on Code Voyeur: A Simple IronPython ActionFilter for ASP.NET MVC There are times when an action filter has transient logic that will change frequently. Logging, authorization or request sanitizing rules are examples of filters that may require extensive configuration to achieve needed flexibility. Rather than create several filters that make excessive use of appSettings, it is possible to use the Dynamic Language Runtime and script files to achieve the same result. This article will demonstrate how to create a filter that uses a simple co

Darrell Hawley on IronPython and LINQ

Darrell Hawley is a Microsoft MVP with an interest in IronPython. We've featured some of his previous writings here , here and here . He's made a couple of posts on using LINQ from IronPython. LINQ is a .NET feature that give first class syntax in C# to queries. Under the hood LINQ is implemented as a series of extension methods and classes. In it's basic form LINQ is similar to Python generator expressions . As well as working on objects LINQ expressions can be used to generate SQL queries. A Python equivalent would be the Dejavu project . LINQ is a language feature where multi-line lambdas really show their power; something that isn't possible in Python of course where lambda functions are restricted to a single expression. The power of LINQ causes Darrell to describe it as: Python developers would be better served to think of LINQ as wrappers around the map , filter and reduce functions. In fact, LINQ is not much different than the “recipes” found in the offi

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 and

IronPython 2.6 Release Candidate 1 Released

IronPython 2.6 is a version of IronPython targeting compatibility with Python 2.6. As well as the new language features introduced in Python 2.6 there are a whole host of new features specific to IronPython. The big new features in IronPython 2.6 are: 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 announcement of Release Candidate 1 from the IronPython team: We’re pleased to announce the release of IronPython 2.6 Release Candidate 1 which can be freely downloaded at the codeplex site . Over the development span of IronPython 2.6, exactly 417 bugs have been fixed.  Since the release of Beta 2, we’ve addressed the following: Non-hosting related APIs previously found in Microsoft.Scripting.dll have been migrated to Microsoft.Dynamic.dll .  The rationale behind this

A Spinning Solar System: 3D Graphics in IronPython and Resolver One

Back in early 2008 I posted a short entry on using IronPython with OpenGL and the Tao Framework for 3D graphics. Tao is a set of bindings to OpenGL and SDL for cross-platform "media application development" with .NET and Mono. My boss at Resolver Systems , Giles Thomas, has been having fun using Tao inside Resolver One. Resolver One is a " Windows-based spreadsheet that integrates IronPython deeply into its recalculation loop, making the models you build more reliable and more maintainable ". Because it is so easy to program with IronPython, my Giles decided it would be a good platform for experimenting with 3D graphics - including a full animated version of the solar system with the paths controlled from the spreadsheet. Both entries have a video of the results and IronPython code to download. 3D graphics in Resolver One using OpenGL and Tao, part I   I’ve been playing around with 3D graphics recently, and decided to find out what could be done using .NET

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 and

A Good Mix 22: Win a book, Mandlebrot Performance, Double clicking in Silverlight and more...

Another collection of blog entries and articles related to IronPython and the Dynamic Language Runtime. Win a book on IronPython or F# Allan Juhl Petersen has a competition running until 29th September where you can win a book on IronPython (and a good book it is too ) or F#: I have created 7 questions, in different programming languages such as C#, F#, Ironpython, C++, Java and of course the well known and liked true or false . The questions are designed to give a number of points, where the maximum number of points given can be read in the text of the assignment. The rules are simple, the one with the highest score on points, will win. Points will be given for correctness and effort. An assignment might give 6 point, but if not entirely correct, it will be given some points for effort. The winner gets Office 2007 Student version and gets to choose between two books ? Foundations of F# or IronPython in Action - and the runner-up gets the one that the winner did not choose. Compa

IronPython in Action Reviews: Dror Helper, Benjamin Peterson and Life in the Cove

IronPython in Action is the first book on IronPython and is aimed at both .NET developers new to Python and Python developers new to .NET. Three more reviews have been posted, one by a core-Python developer (the release manager no less), one by a .NET developer and the third, well, hmm... Python bytes: IronPython in Action Benjamin Peterson is the Python release manager and a contributor to the PyPy project . You might say he knows a bit about Python. Here's an extract from the review: IronPython in Action seems to do a very job, overall, of catering both Python programmers tiptoeing into IronPython and .NET and C# developers finding the light of dynamic programming. I found the web programming part of the book, especially the part on Silverlight, most interesting, since embedding Python in the browser seems like a lot more fun than writing cross-browser JavaScript. Before reading this book, I had dismissed .NET as a non-cross-platform hunk of Javaish APIs. I see now, though, that

More from Mono: Moonlight 2, Monodevelop 2.2 and Debian Packages

Several of the recent entries here have been about Silverlight and IDEs. We continue the theme in this entry, but looking at things from the Mono side of the fence. Moonlight 2.0 Goes Beta Moonlight 2.0 Beta Download Silverlight is a cross-platform, cross browser plugin by Microsoft that allows you to execute Python code in the browser with IronPython. It is a Rich Internet Application framework with a user interface model based on WPF (Windows Presentation Foundation) and full access to the browser DOM. Unfortunately cross-platform only means Windows and Mac OS X, leaving Linux users out in the cold. Fortunately the Mono team have stepped up to the plate. Their implementation is called Moonlight, and Moonlight 2.0 (the version that can run Python code) has recently reached beta. It is a Firefox plugin that runs on Linux and is capable of running most of my IronPython Silverlight examples . MonoDevelop 2.2 Beta 1: We go cross-platform Python support in MonoDevelop What's New in Mon

IronPython Tools and IDEs (and important news about PyDev)

A frequent question on the IronPython mailing list is "what IDE should I use with IronPython?". For many .NET developers the question is phrased slightly differently, "how do I use IronPython in Visual Studio?". Just as with Python this question is not easy to answer, depending to a large extent on what IDEs you have used before and personal taste. It is further complicated in IronPython with the need for features from a .NET IDE and from a Python IDE in order to fully use the language and programming environment. Popular options include IronPython Studio (either integrated with Visual Studio or standalone), Visual Studio itself, SharpDevelop , Eclipse with the PyDev extensions and the Wing IDE from Wingware. All of these tools have different levels of support for working with Python, the .NET framework, and IronPython specifically. This article looks at all of these IDEs and their features. It also covers other editors, plus common tools for Python development (

Intersection of built-in modules between CPython, Jython and IronPython

In the last couple of years or so Python has moved to the point where it has several strong and widely used implementations. The major ones, in terms of usage, are CPython, IronPython and Jython. (A full list of Python implementations is difficult because it really depends by what you mean by "Python". PyPy definitely counts of course, but is Stackless a separate implementation and what about PyMite , Shedskin , Cython , cl-python , Boo , CrossTwine , HotPy and many other projects that are partial or partially complete implementations of Python?) This changes the development of core-Python (the C implementation known as CPython) slightly. As well as being the most widely used implementation CPython also serves as the reference implementation for the others. Brett Cannon is one of the more prolific of the rag-tag bunch of developers comprising the core development team. One of his tasks has been to fully implement the Python import machinery in pure Python: importlib . impo

Dynamic Languages – Back to "Just Text" with Silverlight

Silverlight is the Microsoft cross platform browser plugin that lets you execute Python code (or Ruby) in the browser. When the dynamic languages integration was first announced one of the big advantages that was touted was that it was all " just text ". Like normal Python development your source files were just text files that you could edit, refresh the browser and then see the changes. When the final version of Silverlight 2 finally came out this had changed slightly. Naturally the source files are still just text but they have to be packaged in a zip file called a "xap" file. The xap contains the Python sources and assemblies and the Silverlight IronPython integration automatically executes the application once Silverlight has loaded the xap. The development process is still straightforward as a development server called Chiron will automatically package the xap file on the fly. You run this locally, and it runs fine under Mono on the Mac or on Linux if you are

A Good Mix 21: 3D Modelling, WMI, and IronPython Startup

Another collection of blog entries and articles related to IronPython and the Dynamic Language Runtime. Scripting (IronPython) exposing Naro document API IronPython was integrated for some time to NaroCAD . But in fact it has two problems: It was not able to access NaroCAD shapes or anything from NaroCAD so it was not powerful enough to do something useful, excluding you did want to make a processing task using python IronPython implementation (and python in itself) do not work with Generics. So even you had access to Naro's document model, the Naro's extensible model was not accessible to IronPython script programmers. This is why it was used lazy loading of IronPython as it does useless slowdown on startup of NaroCAD. Right now both are addressed, exposing to you a document reference that you can create from it using a PyNodeUtil class a shape node. This is fairly important achievement as it can make easier without recompile NaroCAD to migrate your shapes if you can expose t

The Further Adventures of IronPython in Turkey

Ibrahim Kivanc is a Turkish blogger and programmer who has been having fun with IronPython and Silverlight. We've covered some of his exploits previously . He's created a new website to promote IronPython in Turkey, but it won't make much sense unless you can read Turkish. ironpythonntr.com Fortunately for those of us who can't read Turkish, Ibrahim is intending to translate his articles into English. He says: I'm in a progress with IronPython for a year. Last year I made presantitons with Microsoft Student Partner program and INETA program in Turkey about Ipy.In my blog I wrote more than 20 articles about IronPython in Turkish, most of them about IronPython with Silverlight working together in my blog . As soon as possible I will also translate my articles to English for foreign people. I translated AgDLR and Chiron in Turkish. Now many Turkish people easily develop Silverlight app with IronPython. This year I will make more presentation and promote IronPython in

Four IronPython Podcasts

It's been a while since I've posted (at least by the standards of this blog) and as usual a lot has happened. This includes four podcasts featuring IronPython. Sod This 7 - Dynamic Again Sod This is the product of the fevered imaginings of Oliver Sturm and Gary Short , two well known English .NET developers. In this episode they interview Harry Pierson , the IronPython program manager for Microsoft. Wow, we managed to record another show right away this time! We talk about a variety of things – my experiences with my Snow Leopard install, 32 vs 64 bit, dynamic languages and how the world is moving on so fast… lots of talk, and during mixing it occurred to me that I was a bit too talkative myself, which makes things a bit unbalanced :-) Well, I guess that’s how it is if there’s “only” two of you. In this episode we also include an interview we recorded with Harry Pierson at TechEd US. Harry is an IronPython guy these days, working for Microsoft as the PM on IronPython, and he