tfh
Volume 21, Number 34 -- September 24, 2012

Python On IBM i: Why?

Published: September 24, 2012

by Alex Woodie

Why might you want to run Python on the IBM i platform? According to the folks at iSeries Python who manage the port of the open source language to IBM i, Python is so readable and easy to learn that it gives programmers a big boost in productivity when they use it, particularly for reporting purposes. And with the recent completion of the port of the Django framework to IBM i, there is one more reason to consider adding Python to your quiver.

The iSeries Python project, which is the brainchild of Per Gummedal, began around 2004. Since then, Gummedal and a handful of programmers and administrators have worked to expand the use of Python on the platform, to explore new uses for the language, and to answer questions on the website's bulletin board.

One of iSeries Python's earliest users, Aaron Fransen, has been managing the website and its site on SourceForge for the last four years. Fransen, who is a programmer at an electrical wholesaler in western Canada, is also one of the biggest proponents of Python on IBM i, as he has witnessed firsthand the power it can bring.

"One of the wonderful things about Python is it's very capable built-in. There's not a lot of stuff you have to add to it," Fransen says. "Python started out as a means for teaching kids how to program, but it ended up being a very well-constructed, object-oriented, positional syntax language."

The positional nature of Python makes it easily readable and quickly understandable. "A lot of the idioms that Python uses aren't obscure like you would find in Java," he says. "It doesn't make heavy use of curly braces and colons and other things. You could write a formula in PHP or in Java that's 100 characters long and has two letters in it, and everything else is a curly brace or some of those special characters, but Python doesn't quite operate like that."

"Python tries very hard to make it very simple to follow, so at a glace, you can look at a Python program and know exactly where you are," Fransen continues. "Some programmers hate that. Programmers like me love it, because it means that if I haven't looked at a program in three years, I can go back and look at it, and within seconds I can follow the flow very simply and find out where I am in it."

The simplicity of the Python syntax and the comprehensiveness of its library combine to make for a very productive environment, and that productivity has led to some high-profile Python projects over the years. Google used Python for much of its early search engine code, while Walt Disney uses it for its production animation system. Much of the National Weather Service's website is written in Python, as was (until recently) NASA's scheduling system.

Python surged to popularity in 2007, when it first won the TIOBE Index's "Programming Language of the Year" award, which it won again in 2010. Currently, Python is ranked the eight most popular language in the world, behind stalwarts like C, Java, Visual Basic, and PHP (but ahead of COBOL and RPG, which are 25th and 28th, respectively).

Most iSeries Python projects today fall into one of two categories: reporting and communications. The iSeries Python website also has lots of example code for accomplishing other tasks with Python and IBM i, including data access, "pickling" between EBCDIC on the IBM i and ASCII on PC platforms, sending email on the IBM i server with Python apps, printing reports, and using ADO to query data on the IBM i server.

Getting another reporting tool was the main reason that Gummedal initially ported Python to the iSeries (as it was called back then), Fransen says. "If you don't want to have to learn RPG on the iSeries, it's a great way to be able to run some reports, and it's super simple to maintain them," he says.

Gummedal began using iSeries Python to provide connectivity between his company's IBM i-based ERP system, the D3 system from CAPP Associates, and an external source of data. "It's useful if you happen to have some legacy functions that you can't get around," he says. "In our case, our ERP is iSeries-based and we wanted to take advantage of some of the functionality we have on our website. Our Web repository, which runs on MySQL and Apache, has scads of data, and it was simply more convenient to grab it off the Web than to have to recreate that data in the iSeries."

Fransen doesn't have a solid estimate on the number of iSeries Python users that are out there. Such is the case with open source projects, where the bytes flow free and the licensing is non-existent. Fransen initially said there might be dozens of active users out there, but after checking the website logs and finding there were 70 downloads of the iSeries Python software in the last month, there's a good indication that the number could be considerably higher.

The iSeries Python board is quite busy, which is another indication of healthy activity. One of the recent pieces of product news to come out of the project was the availability of the Django Python framework on the IBM i platform. Django was initially developed by an online-news operation to host a high-performing and elegant-looking website. It is now available for the IBM i platform, providing a structured way to develop Web applications on the IBM i server.

Python doesn't have any official backing from IBM, which is ironic in a way, because the IBM website has a lot of sample Python code. "IBM has significant references [on its website] for different technical challenges that they've resolved in Python," Fransen says. "But they're doing it from a Windows or Unix standpoint, not from the iSeries standpoint."

That shouldn't stop the intrepid IBM i developer from utilizing Python on the platform to tackle problems or develop new apps. The language is very easy to learn, and delivers new applications very quickly, for those willing to take the plunge.

"I learned it [Python] in a day, and I'm not the world's brightest fellow," says Fransen, a self-deprecating programmer who's background is Assembler and Basic. "Anybody who's reasonably familiar with Basic will understand Python syntax very quickly. Folks who are immersed in PHP or Java will probably have a little bit of trouble at first with the formatting. But once you get used to it, it's very comfortable."


RELATED STORIES

An Introduction to Python on IBM i, Part 3

An Introduction to Python on IBM i, Part 2

An Introduction to Python on IBM i, Part 1

Next Up on the System i: Python



                     Post this story to del.icio.us
               Post this story to Digg
    Post this story to Slashdot


Sponsored By
NEW GENERATION SOFTWARE

Do you want a better understanding of IBM's
recent analytics software announcements?

Are you confused about IBM's support for
Query/400 and DB2 Web Query features?

Would you like help explaining what makes
IBM i ideal for BI?

Read the new White Paper:
BI for IBM i Customers.

Learn about IBM's business and analytics
strategy, DB2 Web Query, Cognos, Microsoft,
Open Source BI, and our alternative, NGS-IQ.

Call 800 824-1220. Visit www.ngsi.com


Editor: Timothy Prickett Morgan
Contributing Editors: Dan Burger, Joe Hertvik, Victor Rozek,
Jenny Thomas, Hesh Wiener, Alex Woodie
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

Datanational:  Move your IBM i backups to the cloud and save. Starting at $299/month
Abacus Solutions:  More affordable and flexible alternatives to deliver secondary workloads
Four Hundred Monitor Calendar:  Latest info on national conferences, local events, & Webinars

 

 

IT Jungle Store Top Book Picks

BACK IN STOCK: Easy Steps to Internet Programming for System i: List Price, $49.95

The iSeries Express Web Implementer's Guide: List Price, $49.95
The iSeries Pocket Database Guide: List Price, $59
The iSeries Pocket SQL Guide: List Price, $59
The iSeries Pocket WebFacing Primer: List Price, $39
Migrating to WebSphere Express for iSeries: List Price, $49
Getting Started with WebSphere Express for iSeries: List Price, $49
The All-Everything Operating System: List Price, $35
The Best Joomla! Tutorial Ever!: List Price, $19.95


 
Four Hundred Stuff
IDSync Comes to IBM i from Trucking World

EVault Delivers Backup Flexibility with Release 7

Zend Expects Biggest PHP Confab Yet with ZendCon '12

Linoma Goes 'Virtual' with GoAnywhere Services 3.0

Real Vision Bolsters Mobile App with Useful New Features

Four Hundred Guru
Future Coding

Checking IBM i OS and PTF Level Status for Sarbanes-Oxley Documentation

Admin Alert: Two Useful PC5250 Parameters In IBM i Access For Windows 7.1

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

System i PTF Guide
September 15, 2012: Volume 14, Number 37

September 8, 2012: Volume 14, Number 36

September 1, 2012: Volume 14, Number 35

August 25, 2012: Volume 14, Number 34

August 18, 2012: Volume 14, Number 33

August 11, 2012: Volume 14, Number 32

August 4, 2012: Volume 14, Number 31

TPM at The Register
Inphi: Don't skimp on memory for those virty servers

IBM: Last chance to load up on Power 6+

Oracle gears up for infrastructure cloud and 12c database launches

Swiss boffins jump in Lake Lugano for Cray super

Sun men bump bellies in Cisco v Arista freaky trade battle

SUSE updates Linux control freak

OpenStack Foundation launches with $10m in funding

Dell bends shiny server linings for denser clouds

Size matters: Bromium 'microvisor' to guard PCs for big biz

Arista touts next-gen switch as malleable as a T-1000 Terminator

Nvidia puts Tesla K20 GPU coprocessor through its paces

VMTurbo sucks up apps and blows them into clouds

THIS ISSUE SPONSORED BY:

BCD
New Generation Software
Abacus Solutions
Tembo Application Generation
RJS Software Systems


Printer Friendly Version


TABLE OF CONTENTS
Power7+ Systems Due To Launch October 3

Python On IBM i: Why?

Applications Misfire When Database Integrity Ignored

As I See It: Legacy

Top CIOs Bring Home The Bacon, IT Salaries Flat As Pancakes

But Wait, There's More:

Reader Feedback On Can My Power 520 Run IBM i 7.1 . . . Put Your Data Center Feeds Into The Flex System TCO Tool . . . Oracle Still Struggling With Systems, But Hanging In There . . . Gartner Says Public Clouds Puffing Faster Than Expected . . . IBM Offers Freebie SmartCloud Slices--Again . . .

The Four Hundred

BACK ISSUES




 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2012 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement