(go to: table of contents, index, list of VMS objects, prev: vmsobj_xabkey, next: vmsobj_xabrdt)
The 'vms_xabprodef' module contains constants
and bitmasks that apply to an OpenVMS XABPRO.
Most BWLQ,M attributes can be directly read and written as shown in the
introduction. Exceptions are noted below:
A read operation results in a new Python string.
Note that ACLs contain binary information.
For now the 'pyvms' module contains a function to
explicitly create a vmsobj_xabpro object within Python.
Examples:
Attributes:
>>> xabpro = pyvms.vmsobj_xabpro ()
>>> type (xabpro)
<type 'vmsobj_xabpro'>
>>>
>>> print xabpro.NXT
None
>>> print xabpro.L_NXT
0
>>>
>>> # this example uses a XABALL
>>> xaball = pyvms.vmsobj_xaball ()
>>> type (xaball)
<type 'vmsobj_xaball'>
>>>
>>> xabpro.NXT = xaball
>>> xaball
<vmsobj_xaball, XABALL at 0x00221568>
>>> xabpro.NXT
<vmsobj_xaball, XABALL at 0x00221568>
>>> hex (xabpro.L_NXT)
'0x221568'
>>>
>>> xabpro.NXT = None
>>> print xabpro.NXT
None
>>> xabpro.L_NXT
0
>>>
>>> xabpro.NXT = 0
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: must be a XABxxx object or None
>>>
>>> xabpro.L_NXT = 2
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: read-only vmsobj_xabpro attribute
>>>
Creation:
>>> import pyvms
>>> # create a vmsobj_xabpro object
>>>
>>> xabpro = pyvms.vmsobj_xabpro ()
>>> type (xabpro)
<type 'vmsobj_xabpro'>
>>> xabpro
<vmsobj_xabpro, XABPRO at 0x00221668>
>>>
>>> # invalid attribute access
>>> xabpro.no_attr = 0
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: non-existing vmsobj_xabpro attribute
>>> xabpro.no_attr
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: no_attr
>>>
...
@@