(go to: table of contents, index, list of vms_smg, prev: PREV, next: NEXT)
Format:
CREATE_PASTEBOARD - Create a Pasteboard
Create a pasteboard and returns its assigned pasteboard identifier.
04-JUN-2000 ZE.
status, pasteboard_id, number_of_pasteboard_rows, \
number_of_pasteboard_columns, type_of_terminal, device_name \
= vms_smg.create_pasteboard ([output_device], [flags])
Returns:
Arguments:
Examples:
Bitmask values like SMG_M_KEEP_CONTENTS are defined in module
'vms_smgdef'.
>>> import vms_smg
>>> import vms_smgdef
>>> # create a new DECwindows terminal using SMG
>>> status, \
... pasteboard_id, \
... number_of_pasteboard_rows, \
... number_of_pasteboard_columns, \
... type_of_terminal, \
... device_name \
... = vms_smg.create_pasteboard \
... (None, vms_smgdef.SMG_M_WORKSTATION)
>>>
Warning! If you re-execute this command another screen is created!
>>> print "status......................:", status
status......................: 1
>>> print "pasteboard_id...............:", pasteboard_id
pasteboard_id...............: 0
>>> print "number_of_pasteboard_rows...:", number_of_pasteboard_rows
number_of_pasteboard_rows...: 24
>>> print "number_of_pasteboard_columns:", number_of_pasteboard_columns
number_of_pasteboard_columns: 80
>>> print "type_of_terminal............:", type_of_terminal
type_of_terminal............: 6
>>> print "device_name.................:", device_name
device_name.................: _FTA20:
>>>
----------------------------------------
>>> # create a pasteboard in the current screen
>>> # leaving off SMG_M_KEEP_CONTENTS will erase the screen
>>> status, \
... pasteboard_id, \
... number_of_pasteboard_rows, \
... number_of_pasteboard_columns, \
... type_of_terminal, \
... device_name \
... = vms_smg.create_pasteboard \
... (None, vms_smgdef.SMG_M_KEEP_CONTENTS)
>>>
>>> print "status......................:", status
status......................: 1
>>> import vms_sys
>>> vms_sys.getmsg (status)
('%SYSTEM-S-NORMAL, normal successful completion', (0, 0, 0, 0))
>>> print "pasteboard_id...............:", pasteboard_id
pasteboard_id...............: 0
>>> print "number_of_pasteboard_rows...:", number_of_pasteboard_rows
number_of_pasteboard_rows...: 24
>>> print "number_of_pasteboard_columns:", number_of_pasteboard_columns
number_of_pasteboard_columns: 80
>>> print "type_of_terminal............:", type_of_terminal
type_of_terminal............: 6
>>> print "device_name.................:", device_name
device_name.................: SYS$OUTPUT
>>>
Note: if you re-execute this command a different status is returned:
>>> print "status......................:", status
status......................: 1212465
>>> import vms_sys
>>> vms_sys.getmsg (status)
('%SMG-S-PASALREXI, pasteboard already exists for this device',\
(0, 0, 0, 0))
>>>
----------------------------------------
>>> # create a pasteboard on a file
>>> vms_smg.create_pasteboard ('FILENAME.TMP')
(1, 0, 66, 132, 0, 'FILENAME.TMP')
>>>
Note: if you re-execute this command another file is created:
$! this logical name defines the page size
$ DEFINE SYS$LP_LINES 72
[...]
>>> vms_smg.create_pasteboard ('FILENAME.TMP')
(1, 0, 72, 132, 0, 'FILENAME.TMP')
>>>
$ directory FILENAME.TMP
Directory DKA100:[PYTHON.PYTHON-1_5_2.VMS]
FILENAME.TMP;2 FILENAME.TMP;1
Total of 2 files.
$
see also vms_lib.lp_lines ()
----------------------------------------
>>> vms_smg.create_pasteboard ('*BADNAME*')
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_smg.error: (100164, '%RMS-F-WLD, invalid wildcard operation')
>>>
>>> vms_smg.create_pasteboard (1)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: expected read-only buffer, int found
>>>
>>> vms_smg.create_pasteboard ('')
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_smg.error: (1409644, '%LIB-F-BADBLOSIZ, bad block size')
>>>
>>> vms_smg.create_pasteboard (None, 'X')
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 2: flags - must be integer or None
>>>
(go to: table of contents,
index,
list of vms_smg,
prev: PREV,
next: NEXT)