|
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)
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:
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:
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!