Python for OpenVMS
(go to: table of contents,
index,
list of vms_lib,
prev: GET_EF,
next: GET_MAXIMUM_DATE_LENGTH)
GET_FOREIGN - Get Foreign Command Line
Format:
resultant_string, flags_out = vms_lib.get_foreign \
([prompt_string] [,flags])
Returns:
- resultant_string
- String that was received from the foreign command line.
Note: in some situations this text is uppercased - please read the
documentation!
- flags_out
- the 'flags' argument of LIB$GET_FOREIGN is passed 'by reference'
because it can be modified. 'flags_out' returns the value from 'flags'
after the call to LIB$GET_FOREIGN.
Please check the examples and read the documentation for more details!
Arguments:
- prompt_string
- Optional text which is used for prompting when no command line is
available.
- flags
- Please read the documentation to understand the usage of this argument.
Examples:
-----
$ python
Python 1.5.1 (V001P1, May 8 1998, 19:23:14) [DECC] on vms
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
portions Copyright 1996-1998 Uwe Zessin
>>> import vms_lib
>>> print vms_lib.get_foreign ()
('', 0)
>>> # (text that is entered is either in italics or underlined)
>>> print vms_lib.get_foreign ('$.')
$.data<RETURN>
('DATA', 0)
>>> print vms_lib.get_foreign ('$.',None)
$.text<RETURN>
('TEXT', 1)
-----
$ type VMS_LIB_GET_FOREIGN1.PY
import vms_lib
print vms_lib.get_foreign()
print vms_lib.get_foreign('?>')
print vms_lib.get_foreign('!>',None)
$ python VMS_LIB_GET_FOREIGN1.PY
('VMS_LIB_GET_FOREIGN1.PY', 0)
('VMS_LIB_GET_FOREIGN1.PY', 0)
('VMS_LIB_GET_FOREIGN1.PY', 1)
$
-----
$ type VMS_LIB_GET_FOREIGN2.PY
import vms_lib
print vms_lib.get_foreign('in: ',1)
$ python VMS_LIB_GET_FOREIGN2.PY
in: Xx<RETURN>
('XX', 1)
$
-----
(go to: table of contents,
index,
list of vms_lib,
prev: GET_EF,
next: GET_MAXIMUM_DATE_LENGTH)
30-SEP-1998 ZE.