(go to: table of contents, index, list of vms_sys, prev: SCHDWK, next: SETDFPROT)
Please note that the device name is stored in the logical name SYS$DISK!
You can use vms_lib.set_logical() to
change this logical name.
Format:
SETDDIR - Set Default Directory
Allows you to read and change the default directory string for the
process.
12-JUN-1999 ZE.
cur-dir = vms_sys.setddir ([new-dir])
Returns:
Arguments:
Examples:
>>> import vms_sys
>>> vms_sys.setddir ()
'[PYTHON.PYTHON-1.4.VMS]'
>>> vms_sys.setddir (None)
'[PYTHON.PYTHON-1.4.VMS]'
>>> vms_sys.setddir ('[-]')
'[PYTHON.PYTHON-1.4.VMS]'
* Note: setddir() returns the _old_ directory
>>> vms_sys.setddir ()
'[PYTHON.PYTHON-1.4]'
* the directory _has_ changed
>>> vms_sys.setddir (1)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: expected read-only buffer, int found
>>> vms_sys.setddir (None,2)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: function requires at most 1 argument; 2 given
>>> vms_sys.setddir ('BAD#DIRECTORY#SYNTAX#')
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_sys.error: (100052, '%RMS-F-SYN, file specification syntax error')
>>> # only 8 levels supported
>>> vms_sys.setddir ('[----------]')
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_sys.error: (99532, '%RMS-F-DIR, error in directory name')
>>>
(go to: table of contents,
index,
list of vms_sys,
prev: SCHDWK,
next: SETDFPROT)