Feeds

Pump some IronPython with Studio IDE

Visual Studio stripped for action

Build a business case: developing custom apps

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.

Bridging the IT gap between rising business demands and ageing tools

More from The Register

next story
KDE releases ice-cream coloured Plasma 5 just in time for summer
Melty but refreshing - popular rival to Mint's Cinnamon's still a work in progress
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Designing a Defense for Mobile Applications
Learn about the various considerations for defending mobile applications - from the application architecture itself to the myriad testing technologies.
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.
Top 8 considerations to enable and simplify mobility
In this whitepaper learn how to successfully add mobile capabilities simply and cost effectively.
Seven Steps to Software Security
Seven practical steps you can begin to take today to secure your applications and prevent the damages a successful cyber-attack can cause.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.