Feeds

Pump some IronPython with Studio IDE

Visual Studio stripped for action

Beginner's guide to SSL certificates

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.

Security for virtualized datacentres

More from The Register

next story
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
Not appy with your Chromebook? Well now it can run Android apps
Google offers beta of tricky OS-inside-OS tech
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Greater dev access to iOS 8 will put us AT RISK from HACKERS
Knocking holes in Apple's walled garden could backfire, says securo-chap
NHS grows a NoSQL backbone and rips out its Oracle Spine
Open source? In the government? Ha ha! What, wait ...?
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Intel: Hey, enterprises, drop everything and DO HADOOP
Big Data analytics projected to run on more servers than any other app
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Security and trust: The backbone of doing business over the internet
Explores the current state of website security and the contributions Symantec is making to help organizations protect critical data and build trust with customers.