Time for a scripting compiler (or why traditional languages look so tempting)

I’ve been playing with Python a little to build GUI programs. Why I chose Python I don’t know - I have a fully licensed copy of Visual Studio.Net on my hard drive (at least for the next 2 years), which would have been more practical to learn (I’ve decide I do like visual GUI builders). Something about not using Microsoft I guess, deep-ingrained in my dislike of their pricing structure (even though I have VS.Net for free).

Anyhow, my experiments (very basic though they have been) led to a small application for my Father to use to process newspaper articles for Grandad’s text-to-speech converter. All fine and well; it didn’t take long to write using “PythonCard”:http://www.pythoncard.org/ and works reasonably well (although the textarea provided by PythonCard cannot cope with long articles, and cuts them off, which has annoying consequences if Dad doesn’t spot this).

And so I’ve enountered the problem that has I believe held up the adoption of scripting langauges in “serious” application development: there’s no neat way to distribute the finished product.

I had set up Python/Pythoncard/WxWindows on the computer at home before leaving so Dad could run the application. A couple of weeks ago I got an email saying “I took the program file into the office but it won’t run on the computers here. Why?”. One email later and I’d elicited the fact that he took the @.rsc.py@ and the @.py@ file into the office but hadn’t installed Python.

While it wouldn’t have been difficult to walk him through the installation of Python et al, he didn’t have the time to spend getting it set up (as well as an impending computer move), and so cannot use the program at work.

I know that people have developed packaging systems for python (such as “py2exe”:http://py2exe.sourceforge.net/ and “pyco”:http://www.pythonapocrypha.com/projects/pyco/) and I could use those, but for such a tiny program it seemed like too much effort (to learn to use one of them would have taken longer than writing the program - OK, I’m lazy!) they still produce larger files than an executable version would. Not particularly important in this case, but the increase in size would be very noticable. Plus, the script stores its settings in a file, and from a quick look at the packagers there’s no way to allow the user to edit one of the files in the package in a text editor.

Laziness is something I could overcome (I guess :)) but for other uses of Python that I’m planning, such as physics simulations/teaching material, size does become a much more important issue. As does performance obviously, but for teaching the ease of use of the “VPython”:http://www.vpython.org library outweighs the drawbacks (even if its graphics are pretty horrible, at least it works!).

Traditional (compiled, statically typed) langauges are starting to look more and more attractive. Sure, they’re harder to develop, and slower (unless you’re well-versed in them) but the tools available are more advanced, and distribution (for one platform at least) is much easier.

What would really set scripting languages centre-stage is an efficient compiler/packager. I’d love to get the equivalent of a Delphi single-executable program out of my Python code.

Build the compiler/packager into an IDE, complete with GUI builder equivalent to Borland’s Delphi (or Visual Studio) and think what a potent tool you have for attracting developers. Fast development (as Python always provides) coupled with the comforts and benefits of a traditional language. Oh, and to have a cross-platform IDE with the ability to package for any platform (not Just MS Windows) would be excellent.

Think I’m misguided, or plain wrong? Then leave a comment. I’m happy to be corrected :-)

1 comment so far ↓

#1 Kok Koon Leong on 05.26.06 at 4:56 am

Hi. Why not try the latest beta release of SharpDevelop (v.2). It runs on .NET 2.0 platform and it supports Boo - a .NET derivative of python. It has all the GUI capabilities of the .NET system as well as Mono. You might like it.

Leave a Comment