This article is more than 1 year old

Pump some IronPython with Studio IDE

Visual Studio stripped for action

Other widgets are as easy to access and program. For example, to grab a list of Excel workbooks in a directory that's entered in a text box and then dump them into a list box on the click of a button, we can add the following code to the button click event:


@accepts(Self(), System.Object, System.EventArgs)
@returns(None)
def _button1_Click(self, sender, e):
import glob
wkbs = glob.glob(self._textBox1.Text)
self._wkbList.Items.Clear()
for w in wkbs:
self._wkbList.Items.Add(w)

As previously mentioned, WinForms aren't the only GUI option, and there's support for Windows Presentation Foundation included as well. This includes editor support for XML, necessary for the editing of XAML files that define the GUI components.

The IDE provides both a design view and a XAML view, so that widgets can be dragged onto a container and the XAML is updated automatically. And it's a two-way process: edits to the XAML are rendered in the design view.

Debugging is very straightforward, with all of the normal debugging functionality provided for - stepping through code, setting breakpoints and watches, viewing debug output, local variables and so on. In practice this is one area of IronPython Studio that is prone to tip, but then this seems a bit ropey even in Visual Studio 2005 for more complex applications.

Deployment and builds are also handled within the IDE, which means that it's possible to create an IronPython application that can be packaged as a .exe and distributed along with the IronPython .dll files for deployment. Multiple build types can be defined for a project and these can be built, rebuilt or cleaned - dynamically or in batches.

Another thing worth noting is the facility to have an IronPython interpreter session open in a dockable window, which is kind of nice for those who like to try things out interactively and then paste the code into their projects. For seasoned Pythonistas this is very much in the "glad to have" category.

Other nice features include a server and database explorer, and a snippets manager so you can template bits of code for easy insertion into your applications.

In all, IronPython Studio provides a pretty good environment for developing Python applications for the .NET platform. At the moment there's a lot of focus on dynamic or scripting languages - such as Python, Ruby and Groovy - exploiting the Java platform. The existence of IronPython shows .NET isn't about to be left behind while IronPython Studio provides some much needed tool support.®

More about

TIP US OFF

Send us news


Other stories you might like