amigapython2.png (3614 bytes)   Amiga specific extensions

Currently there are a number of Amiga specific extensions to the 'core' Python:

Of course, time permitted, as AmigaPython evolves this list may grow!

bluemarbline.png (4687 bytes)

  ARexx Module

AmigaPython includes very powerful ARexx support. I added a low-level builtin module (ARexxll) and a high-level module (ARexx, written in Python). You're able to add an ARexx port to your Python programs in no-time, and you're also able to control other applications from Python by sending them ARexx commands to their ARexx port. The ARexx module implements:

  • port class (generic ARexx port root class)
  • privateport class (private ARexx port for sending messages only)
  • publicport class (public ARexx port to receive commands on)
  • host class (full-featured ARexx host class, including powerful command parser and dispatcher)
  • wrapper functions for easy ARexx message sending
  DOS Library Module

For more powerful operation under AmigaDOS, and because I needed it for the ARexx implementation, there are two additional modules. The first is the low-level builtin module Doslib, and the other, the Dos module, is written on top of it (in Python). They work together much the same as the strop and string modules do: you don't use the builtin one directy but rather the higher-level module. So, you will only need to use the Dos module which provides the following:

  • set of AmigaDOS specific functions, like Relabel, Examine, SetComment, SetFileDate, etc.
  • functions for waiting on and checking of AmigaDOS signal flags
  • definition of a set of AmigaDOS flags (break signals, file protection bits etc.)
  • higher level wrapper and utility functions like touch, AssignAdd, etc.
  • ArgParser class. This is an argument string parser to parse strings according to a template as understood by the standard AmigaDOS ReadArgs function. The ARexx module uses it for parsing the ARexx command arguments. This is actually a very powerful class!
  Workbench Support

Ofcourse AmigaPython supports the Workbench. You can:

  • launch AmigaPython from the Workbench
  • launch Python scripts from the Workbench (icons are provided)
  • associate Python scripts as tools to data files! This is cool!

And as you might expect: tooltypes and multi-selected icons are converted to command line arguments. Python never knows it was launched from the Workbench!

  Enhanced Environment Variables

For total control and flexibility I've added a module (environment) that implements various functions to control your environment variables from within Python. AmigaPython discriminates between Global environment variables (in ENV:)  and Local environment variables (shell-local). You're able to read, write and update both types of variables. For portability, os.environ contains both types.

  Miscellaneous Amiga Enhancements

Finally there are some small enhancements scattered throughout the program, but mostly in the amiga module. For instance, I've added a very fast CRC-32 checksum function. In the select module, I've added an enhanced version of the select function. The AmigaPython version is able to wait not only on network events, but also on DOS signals, with or without a timeout!

Old text. No updates anymore. ŠIrmen de Jong.