Feeds

Pump some IronPython with Studio IDE

Visual Studio stripped for action

Secure remote control for conventional and virtual desktops

Hands on part 2 When I looked at IronPython in part one, I focussed on how it marries the Python language and libraries with Microsoft's .NET framework.

The sample code that was developed used the Python console (ipy) and a text editor - in other words with simple text-based tools for writing short scripts. But for bigger projects, or when coding GUIs, a text editor obviously isn't enough.

For more heavy lifting, there's IronPython Studio - a complete (and free) integrated development environment for IronPython with GUI design tools, a debugger and much more. In part two of my look at IronPython, I'll show take you through the tools and tricks of using one of Microsoft's latest .NET development combos.

IronPython Studio is based on Microsoft's free Visual Studio 2008 Shell runtime. It requires .Net Framework 3.5 and the Visual Studio 2008 Shell (isolated mode) Redistributable, as well as the installer that can be downloaded from here. In addition to the IDE, IronPython Studio also includes version 1.1.0 of the IronPython interpreter.

As it uses isolated mode, IronPython Studio doesn't interfere with existing installations of Visual Studio 2005 or 2008. It's also worth noting that it's an open source project - released under the Microsoft Public License - and that the source code is also available for download.

Visually, IronPython Studio presents a familiar look and feel and those who've ever used other versions of Visual Studio should feel quite at home. The usual array of elements that include tools bars, dockable controls, editors and navigation bars are all present and correct.

Clicking on New Project opens a dialog box that offers a choice from four pre-defined templates: Class Library, Console Application, Windows Application and WPF Application, providing the opportunity to code IronPython applications with a GUI front end.

WinForms applications are handled in the usual Visual Studio style, offering both a design view - with controls that can be dragged and dropped into place on a container, property grids where you can view and set properties - and a code view where you can edit code.

The editor provides the usual functionality such as syntax colouring, Intellisense, code navigation functions, error highlighting and bookmarking. It makes creating Python applications for the .NET platform very straightforward, particularly for those developers already versed in the ways of Visual Studio.

Registering event handlers for widgets, for example, is as simple as assigning the handler to the widget. For example a button click handler can be assigned as follows:

self._button1.Click += self._button1_ClickHandler

This is a reference to the bit of Python code that will be called when the button is clicked. IronPython Studio even creates the skeleton code for you when you add a widget to your GUI. Dragging and dropping a button on a form generates the skeleton handler code:

@accepts(Self(), System.Object, System.EventArgs)
@returns(None)
def _button1_Click(self, sender, e):
pass

The pass statement is a "do nothing" command, so replace it with the code to perform the action required.

Boost IT visibility and business value

More from The Register

next story
'Stop dissing Google or quit': OK, I quit, says Code Club co-founder
And now a message from our sponsors: 'STFU or else'
Why has the web gone to hell? Market chaos and HUMAN NATURE
Tim Berners-Lee isn't happy, but we should be
Microsoft boots 1,500 dodgy apps from the Windows Store
DEVELOPERS! DEVELOPERS! DEVELOPERS! Naughty, misleading developers!
Mozilla's 'Tiles' ads debut in new Firefox nightlies
You can try turning them off and on again
Apple promises to lift Curse of the Drained iPhone 5 Battery
Have you tried turning it off and...? Never mind, here's a replacement
Uber, Lyft and cutting corners: The true face of the Sharing Economy
Casual labour and tired ideas = not really web-tastic
Linux turns 23 and Linus Torvalds celebrates as only he can
No, not with swearing, but by controlling the release cycle
prev story

Whitepapers

Top 10 endpoint backup mistakes
Avoid the ten endpoint backup mistakes to ensure that your critical corporate data is protected and end user productivity is improved.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Backing up distributed data
Eliminating the redundant use of bandwidth and storage capacity and application consolidation in the modern data center.
The essential guide to IT transformation
ServiceNow discusses three IT transformations that can help CIOs automate IT services to transform IT and the enterprise
Next gen security for virtualised datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.