(go to: table of contents, index, list of VMS objects, prev: vmsobj_rab, next: vmsobj_xabdat)
The 'vms_xaballdef' module contains constants
and bitmasks that apply to an OpenVMS XABALL.
Most BWL,M attributes can be directly read and written as shown in the
introduction. Exceptions are noted below:
For now the 'pyvms' module contains a function to
explicitly create a vmsobj_xaball object within Python.
Examples:
Attributes:
>>> xaball = pyvms.vmsobj_xaball ()
>>> type (xaball)
<type 'vmsobj_xaball'>
>>>
>>> print xaball.NXT
None
>>> print xaball.L_NXT
0
>>>
>>> # this example uses a XABDAT
>>> xabdat = pyvms.vmsobj_xabdat ()
>>> type (xabdat)
<type 'vmsobj_xabdat'>
>>>
>>>
>>> xaball.NXT = xabdat
>>> xabdat
<vmsobj_xabdat, XABDAT at 0x001ea898>
>>> xaball.NXT
<vmsobj_xabdat, XABDAT at 0x001ea898>
>>> hex (xaball.L_NXT)
'0x1ea898'
>>>
>>>
>>> xaball.NXT = 0
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: must be a XABxxx object or None
>>>
>>> xaball.L_NXT = 2
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: read-only vmsobj_xaball attribute
>>>
Creation:
>>> import pyvms
>>> # create a vmsobj_xaball object
>>>
>>> xaball = pyvms.vmsobj_xaball ()
>>> type (xaball)
<type 'vmsobj_xaball'>
>>> xaball
<vmsobj_xaball, XABALL at 0x0021a628>
>>>
>>> # invalid attribute access
>>> xaball.no_attr = 0
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: non-existing vmsobj_xaball attribute
>>> xaball.no_attr
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: no_attr
>>>
...
@@