(PYVMS LOGO) Python on OpenVMS

(go to: table of contents, index, list of configurations, )


module methods


The list of a modules' methods is usually defined by a 'C' structure within the 'C' souce file of the module.

Beginning version 1.5.2-V004 this table _can_ be replaced by an external data file per module. To date, only the following modules have been changed:

These modules have been the prime target in order to support multiple operation system versions, because newer ones provide additional calls which result in LINK errors, at minimum. Adaption of other modules (if that is wanted) should be easy by taking them as an example.

Maintenance:

Example:
    $ edit VMS_SYS__METHODS.DAT
      ...
    $ @ MODULEMETHODS2MAR  VMS_SYS__METHODS.DAT  "."  "."
    $ directory VMS_SYS__METHODS;

    Directory DKA100:[PYTHON.PYTHON-1_5_2.VMS]

    VMS_SYS__METHODS.DAT;2

    Total of 1 file.
    $

    $ @ DMACRO_VMS  VMS_SYS__METHODS
    %DMACRO-I-MODULE, compiling module VMS_SYS__METHODS
    $ directory VMS_SYS__METHODS;

    Directory DKA100:[PYTHON.PYTHON-1_5_2.VMS]

    VMS_SYS__METHODS.DAT;2                 VMS_SYS__METHODS.MAR;2

    Total of 2 files.
    $

    $ @ LINKD_PY
    ----------------------------------------------------------------
    %LINKD_PY-I-LINKPRG, linking program PYTHON_VAX.EXE
    $

    $ directory PYTHON_*.EXE;

    Directory DKA100:[PYTHON.PYTHON-1_5_2.VMS]

    PYTHON_VAX.EXE;1

    Total of 1 file.
    $

format of mod__METHODS.DAT


A comment is started by the "!" character. It must be in column 1 on a comment-only line.
A ";" in column 1 is also treated as a comment, however the entire line is also copied to the output '.MAR' file where it is used as a comment as well.

A line that begins with 'LABEL=' defines the name of that table. This name is used by the module's initialization routine when calling 'Py_InitModule4()' - Please lookup the string 'vms_lib__methods' in file 'VMS_LIB.C' to see how this works.

All remaining lines define a module's methods - their layout is as follows:

column 1
The method name as seen inside Python.
Mixed case is allowed. One or more SPACE characters delimit this column from the next one.

column 2
Name of the method's routine - usually a 'C'-function.
Mixed case is allowed, but is currently not used on OpenVMS. One or more SPACE characters delimit this column from the next one.

column 3
Method-Flags
"MV" indicates "METH_VARARGS" - no other values are currently implemented. Mixed case is not allowed. One or more SPACE characters delimit this column from the next one.

column 4
DOC-String label
Address of a documentation string that will be attached to the method. This is a zero-terminated string, that is usually defined like:
    char meth__doc [] = "v = meth (p1, p2)\nshort description.";

Mixed case is allowed, but is currently not used on OpenVMS. One or more SPACE characters delimit this column from the next one.

column 5
VAX/Alpha version
The earliest version number for the VAX or Alpha architecture where this method is supported. This is usually only used for operation system interfaces - other modules will use the standard mechanism.

There is no explicit termination indicator required / supported in this file.


(go to: table of contents, index, list of configurations, )

11-JUL-1999 ZE.