6

I need to make some Python applications for a work project. The target platform is AIX 5.3.

My question is: What version of Python should I be using?

My requirements are:

  • The Python version must be easy to install on the target machines. Others will do that according to instructions that I write, so no compiling from source or anything like that.

  • The Python version must have ncurses or curses support (I'm making a form handler).

I've found two different precompiled versions of Python for AIX, but one (2.1.something) didn't include the curses module, and the other (2.3.4, RPM format) had prerequisites that I failed to fulfill).

Any help would be greatly appreciated.

Enfors
  • 960
  • 2
  • 14
  • 25
  • 1
    Why not bundle a custom compiled python version with your app so that you can always be assured that it is running in the same environment? – Elijah Oct 29 '09 at 20:28
  • My first thought was "hemlock," but AIX is probably not the same OS it was in say, 1994. – Don Branson Oct 29 '09 at 20:30
  • Bundle a custom compiled version? Yes, I suppose that's an option. If I "./configure --prefix=(some nonstandard location)" I suppose it'd be easy to extract the files that "make install" place there, and then make a script that will install them in the standard location on the target machines. Thanks. – Enfors Oct 29 '09 at 20:53

3 Answers3

7

Use the AS Package of Python 2.6.3.7 from Activestate. They have a binary package for AIX on their download site.

If you don't have an AIX machine to test it on, the install works the same way on Solaris or Linux, so you could write your documentation based on that. Basically, you ungzip the tarball file, use tar to unpack the archive, change directory to the unpacked folder, run a shell script to install it, tell the shell script what directory to place it in, and wait.

Normally this would be used to install into a user directory, without superuser permissions, but you could install it anywhere that you like. You might also need to edit the system profile in order to make sure that all users can find the Python binary.

I suggest the latest Python 2.6, because it has a lot of bugfixes, and there is now a critical mass of 3rd party libraries ported to it. Also, the standard library includes a lot of useful stuff that you used to have to collect separately. Curses is in the standard library of Python 2.6.

Make sure to avoid Python 3.1 since it has not yet matured enough and provides few benefits for most business applications development.

Michael Dillon
  • 31,973
  • 6
  • 70
  • 106
  • First of all - wow. You guys are fast. Several answers already. I took a brief look at ActivePython earlier today, but I got the impression that it wasn't free for professional use? Perhaps I was mistaken? Also, gzip isn't available in AIX 5.3 I think, so I'd need to repackage the archive. Or at least, gunzip it before delivery. – Enfors Oct 29 '09 at 20:49
4

I'd compile it from source myself and tell them where to download it from in the instructions

John La Rooy
  • 295,403
  • 53
  • 369
  • 502
  • This is a military application, and I'm afraid the target machines will have neither Internet connectivity nor compilers. But thanks for your response. – Enfors Oct 29 '09 at 20:51
  • 3
    Those details should have been part of your question. Compile it yourself and get it on there the same way you would put the RPM then. They don't need compilers on their machines. – John La Rooy Oct 29 '09 at 20:56
  • Right. I didn't realise (until I thought some more about it) that it's trivial to make my own "distribution" of Python by compiling it myself. – Enfors Oct 29 '09 at 20:59
  • @Enfors: still no reason to build it yourself *for* the target system and then simply ship that with your project release. I have just run a successful default build of 2.7.3 with `CC=$(which gcc) ./configure --disable-ipv6`. The `--disable-ipv6` was needed because no `getaddrinfo` function was available and setting `CC` was necessary because `./configure` used the wrong default compiler. I find it strange that something like ActiveState Python would suffice in the context you describe. Building yourself sounds much smarter there. – 0xC0000022L Mar 18 '13 at 21:52
1

We've used ActiveState's Python as well as Pware's compiled version. Both have worked well. For AS, we've used 2.5 and 2.6. For Pware, just 2.6. Both 2.5 and 2.6 from AS support curses on our machine.

I've compiled from source but usually wind up having trouble with with ctypes or SSL. Currently I have the Frankenstein option going of AS Python2.6 installed but I pulled out a couple of *.so files from Pware's. I'm using GCC since we've never ponied up for a compiler but depending on what you need from Python, it's definitely doable if I can do it.

I will mention that AS Python claims to be 100% compatible with standard Python and it has been for everything we've done so far (mostly web applications).

chauncey
  • 676
  • 11
  • 20