Site icon IT World Canada

Python putting the squeeze on other VHLLs

It’s only natural for a python snake to squeeze the breath out of its prey before devouring it.

Python the programming language isn’t devouring its prey/competition just yet, but it is rumoured to be good enough to overcome other very high-level languages (VHLLs) and as a result it is beginning to squeeze out a substantial piece of the market for itself. Python is an interpreted, interactive, object-oriented programming language that is often compared to TCL, Perl or Scheme. It’s open-source development is building a loyal following and it has been implemented on Amiga, BeOS, QNX, VMS, Windows CE, Psion, Linux, Unix, Sun, Solaris, SGI IRIX, IBM AIX, HP-UX, SCO, NeXT, BSD, FreeBSD, NetBSD and Windows.

“It’s a scripting language and it’s very quick and useful to do simple programming…it’s a fabulous tool for building quick applications that don’t have huge loads running on them,” said Anne Thomas Manes, a senior analyst for the Patricia Seybold Group in Boston.

Already well established in the Unix and Linux world, Python – named by founder Guido van Rossum after the British television comedy series Monty Python’s Flying Circus – is emerging as a useful tool for Windows programmers and overall use of the language is reputed to be growing dramatically since its inception in 1990.

advocates

Authors Andy Robinson and Mark Hammond collaborated on a new book entitled Python Programming on Win3.

“Python has superb support for Windows…I felt it filled an enormous gap in the corporate world, in that it supported both Windows-specific integration techniques such as COM and the Unix/Internet tools,” said Robinson, the CEO of Internet start-up ReportLab, in his native England, which builds Python-based reporting solutions for generating PDF documents in real time on the Web.

“Python has the potential to be the glue that binds the back office together due to its support for all of the key integration technologies. Visual Basic might let you get data from an ODBC database, but isn’t nearly as useful when you want to pump it into an HTML page, FTP it to a remote Unix machine, or parse large amounts of text.”

Python has modules, classes, exceptions, very high level dynamic data types and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Being a scripting language, Python is complementary to Java.

Like Robinson, David Ascher is a Python advocate.

The IT consultant, trainer and author of Learning Python is now a senior developer for ActiveState Tool Corp. – a Vancouver-based company which provides enterprise-wide deployment and products for Perl. Ascher’s role in the company is to spearhead several Python-related projects.

Ascher – who’s been using Python to develop various software since 1995, including Web front ends to databases, image analysis tools and tools for hand-held computers – said ActiveState’s move to Python is another chapter in the organization’s history of aiding programmers.

“Perl and Python are both extremely powerful tools, but for all their success among system administrators many potential users do not feel as comfortable using them as they do other solutions which may be less technically appropriate for them, but which are better marketed,” he said.

Thomas Manes expects Python to rival Perl and TCL. “There are certain applications Python is better for, while there are certain applications Perl is better for,” she said. “But Python has a very simple syntax and a lot of power…there are a lot of critics of Perl and TCL but there are none for Python.”

increasing output

Python offers increased productivity. For example, a source-level debugger allows inspection of local and global variables, evaluation of arbitrary expressions, setting breakpoints and stepping through the code a line at a time.

Robinson said Python is growing in popularity as a first choice language for programmers.

“We are up to about half a million users and growing fast and this is for real programming and not just dressing up Web pages,” he said. “It could become the first language for people learning to program… the language has a shot at becoming the standard for high school and college programming courses, which would make it massive.”

Popularity may breed contempt. But it also breeds excitement, which is very contagious. Even Eric Raymond, the founder of the open-source movement, recommended Python as the first language of choice in his essay How To Become A Hacker.

However, there is a downside.

“It lacks type safety and raw speed when doing things like byte-level loops or numerics,” Robinson said. “For this reason, a very successful recipe is to mix a systems language like Cor Java with Python in the same application. The speed-critical functions can be written as compiled Python extensions written in C, giving benefits of speed and safety in the application core, and a flexible scripting wrapper around it.”

Some programmers might argue that unlike Perl, TCL/TK is both elegant and much more widespread. “In my experience, programmers who switch to Python tend to be quite enthusiastic about the language,” Ascher said. “I would strongly encourage IT managers to investigate Python, try it out on a few non-mission-critical projects and judge whether on a case-by-case basis the advantages of the language are worth the transaction costs.”

Despite Python’s booming reputation, there remains a scant number of programmers who are completely familiar with it.

“I routinely hear from managers that while Python programmers are hard to find, the better strategy is to find someone smart and teach them Python in a couple of weeks,” Ascher remarked. “As Python’s visibility increases, this problem will go away, as the language is among the easiest to learn.”

Exit mobile version