(PYVMS LOGO) Python on OpenVMS

(go to: table of contents, index, list of vms_lib, prev: ASN_WTH_MBX, next: CONVERT_DATE_STRING)


ATTACH - Attach Terminal to Process


Format:
    vms_lib.attach (process_id)
Returns:

None

Arguments:

process_id
Identification of process to which the process should be attached. The PID must be a number, not a hex-string!
Examples:
>>> import vms_lib

>>> vms_lib.attach (232)
%DCL-S-RETURNED, control returned to process USERNAME
$ ATTACH /IDENTIFICATION=%X2E0 ! get back to Python
>>>

>>> # a PID must be a number within Python
>>> vms_lib.attach ('%XE8')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: illegal argument type for built-in operation

>>> # a PID for a process that does not exist
>>> vms_lib.attach(99999)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_lib.error: (2280, '%SYSTEM-W-NONEXPR, nonexistent process')

>>> # process does exist, but is not in current process' tree
>>> vms_lib.attach(1124)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_lib.error: (1409940, '%LIB-F-ATTREQREF, attach request refused')

>>> vms_lib.attach ()
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: function requires exactly 1 argument; 0 given

>>> vms_lib.attach (None)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: illegal argument type for built-in operation
>>>

(go to: table of contents, index, list of vms_lib, prev: ASN_WTH_MBX, next: CONVERT_DATE_STRING)

30-SEP-1998 ZE.