Posts

Showing posts with the label scripting

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

FDO Toolbox (Geospatial Data Tool) IronPython Scripting

FDO Toolbox is an open source " multi-purpose geospatial tool to create, analyse, process and manage spatial data. It is written in C# and uses the Feature Data Objects (FDO) API ". Going on from his success at the Free and Open Source Software for Geospatial conference in Sydney, the main developer has announced a new version that includes IronPython scripting support for extending the toolbox. FDO Toolbox 0.8.7 (Fresh from FOSS4G) Here's a new release of FDO Toolbox, fresh from the FOSS4G 2009 conference. This was the exact build I was demonstrating during the presentation, which went better than I expected. The new main features include: IronPython Scripting With the introduction of a IronPython scripting engine, FDO Toolbox now has a 2nd extensibility point. You can now customise and drive FDO Toolbox through python scripts. I will be posting some example scripts in the near future to demonstrate what can be done with a scripting engine. The side-effect of...

A Good Mix 29: Small PIL for IronPython, iDalogue, Book Sales, Umbraco and PDC

More IronPython and DLR related projects, articles and news from around the web. Small PIL for IronPython  One of the disadvantages of developing with IronPython, particularly for using existing libraries and codebases, is that C extensions don't work. One possibility is to use Ironclad , a C extension compatibility layer by Resolver Systems. Another one is to find or create a compatible API using .NET libraries. An important C extension in the Python world, virtually ubiquitous where images are used and manipulated, is the Python Imaging Library . All sorts of other projects (Django and Reportlab for example) use PIL, causing problems for using them from IronPython. A Japanese blogger has * started * to solve this problem by creating an IronPython project called "small pil" implementing part of the PIL API for IronPython. Changes to Dialogue Script in December 2009  i-Dialogue is a "Customer Experience Management" application by Cubic Compass. It is relev...

Using IronPython as a Scripting Engine

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

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

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

Gestalt: Ruby, Python & XAML in your HTML pages

Silverlight makes it possible to script the browser with Python and Ruby (IronPython and IronRuby of course), but the experience is very different to working with Javascript. That could all change thanks to a new project from MIX Online Labs called Gestalt. Gestalt Gestalt is a library released by MIX Online Labs that 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. Amongst its features it promises: Make way for Ruby & Python, JavaScript! Gestalt lets you write Ruby & Python within script tags (or linked scripts) right in your (X)HTML pages allowing you to do everything and more you've been used to doing in the page with JavaScript. Transparently compiled and blazing fast When a user visits a page that uses Gestalt, we harness the power of th...

IronPython for build scripting

Python is ideal for tasks like automating build processes. Similarly, in a .NET environment IronPython is a valuable tool. Steve Gilham has been putting IronPython to work in his current project. IronPython for build scripting Following on from the earlier post with the snippet about generating GUIDs -- and covering a good chunk of what's been occupying me since... I have ended up in charge of the build system for the current project at work. This started out with one framework that used a number of custom projects inside a solution to perform unit test, FxCop and coverage analysis, with a lot of magic happening in post-build steps, including direct calls to Wix command-line utilities. Another team had developed a better separated MSBuild-based system, which split out things like the analysis and installer building from the assembly-building solution. We can argue the merits of taking the unit tests out of every checking compile; but separating out the installer build does have a s...

Visual Micro-Blogging Tool - with IronPython Scripting

VMBT is a Visual Micro-Blogging Tool (it looks like a combination of Twitter and IRC in a single client). You can see some screenshots of it in action here . In a recent post the developer announced an exciting new feature coming soon: New Major Feature Next version of VMBT will include a customization feature via the Dynamic Language Runtime functionality of .NET. This allows you (the user) to enhance the client with your own code. Scripting through Python allows you to do your own thing on events like chat on public, friends timeline or searches. You can also control the Twitter-API from this scripting language and create your own windows, manipulate statuses/users appearance in the client’s chat window. A simple example of this functionality would be to create a script that follows everyone who mentions you or something you define. Another example is a script that stores all URLs that are mentioned in a global URL-list, or like the native functionality already does, expand tinyurls...

i-Dialogue Now Supports Python

i-Dialogue now supports scripting with Python through IronPython. iDialogue is an SaS (Software-as-Service) system integrated with the Salesforce CRM. They call it a 'Customer Experience Management' system (marketing tools). i-Dialogue Now Supports Python Basic Python Demonstration Mike Leach was new to Python, and he likes it: After only a few days of playing with Python, I see now what others have been raving about. Web developers will really enjoy using Python with Dialogue Script: Cleaner code. Easier to read and manage No need for thick IDEs. Too often, an IDE like Eclipse or Visual Studio stands between you and the desired solution. Dialogue Script development is 100% browser-based (yes, it even works in Chrome!) Agile business rules management. Work side-by-side with business users and apply business rules directly in web pages Dynamic typing

NVidia FX Composer 2.5: Scripted with IronPython

This is old news, but something that I've only just discovered. NVidia FX Composer 2.5 is scripted with IronPython. FX Composer 2.5 (Windows only I guess) is a " powerful integrated development environment for shader authoring ". The home page has screenshots and more details: NVidia FX Composer 2.5 GPU Shader Authoring Environment From the FX Composer User Guide (PDF) : " Scripting in FX Composer is typically accomplished using the Python scripting language. The implementation of Python used is IronPython 1 from Microsoft. IronPython supports all of the standard python syntax & library, with the additional advantage that it is implemented in a .NET language. This means that python scripting in FX Composer can call the rest of the FX Composer engine without additional work. It is important to note that none of the core functionality of FX Composer requires Python. The scripting is implemented entirely using a plugin (FXComposer.UI.Python), and in theory...

Manifold 8 - with IronPython Scripting

Manifold 8.00 has just been released. Included in the release highlights are 'IronPython Scripting'! Manifold is a Geographic Information System package. Python has steadily been gaining ground as the standard scripting language for GIS applications. Via Spatially Adjusted .

IronPython supported in GIMP#

Maurits Rijk posts about his on-going work with enabling IronPython scripting support in GIMP#. http://maurits.wordpress.com/2007/01/16/ironpython-supported-in-gimp/#more-53

Playing with IronPython

Maurits Rijk posts about IronPython becoming a scripting language for GIMP# http://maurits.wordpress.com/2007/01/13/playing-with-ironpython/