VMS-Specific Python Modules

From VSI OpenVMS Wiki
Revision as of 05:00, 31 August 2020 by Sergey vorfolomeev (talk | contribs) (Created page with "VMS specific Python modules. == vms.decc == Provides DECC functionality. === dlopen_test(name:str)->int === Tries to open a shared image. ==== parameters ==== * <code>name:s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

VMS specific Python modules.

vms.decc

Provides DECC functionality.

dlopen_test(name:str)->int

Tries to open a shared image.

parameters

  • name:str path to the shared image

returns

  • 1 if the shared image exists and can be opened by dlopen()
  • 0 otherwise

fix_time(vms_time:int)->int

Converts VMS time to the Unix time.

parameters

  • vms_time:int VMS system time

returns

Time in Unix format (seconds that have elapsed since 1970.01.01)

from_vms(vms_path:str, wild_flag:int)->list

Converts VMS path to a list of Unix paths.

parameters

  • vms_path:str path in VMS format (supports wildcards)
  • wild_flag:int If set to 0, wildcards found in the vms_path are not expanded

returns

List of paths in Unix format

getenv(name:str, def_value:str)->str

Gets the specified environment variable value. See getenv() description in the HP C Run-Time Library Reference Manual for OpenVMS Systems documentation.

parameters

  • name:str name of the environment variable
  • def_value:str default value

returns

Environment variable value

sleep(seconds:int)->int

Suspends execution of the current process or thread for the specified number of seconds.

parameters

  • seconds:int seconds to sleep

returns

The number of seconds left to the end of the sleep period if sleep is interrupted. 0 if the process slept for the specified number of seconds.

sysconf(name:int)->int

Provides a method for determining the current value of a configurable system limit or whether optional features are supported.

parameters

  • name:int system variable to be queried

returns

Requested value

to_vms(unix_path:str, allow_wild:int, no_directory:int)->list

Converts UNIX style file specifications to OpenVMS file specifications.

parameters

  • unix_path:str file name in UNIX style file specification format
  • allow_wild:int If set to 0, wildcards found in unix_path are not expanded
  • no_directory:int An integer that has one of the following values:
    • 0 - Directory allowed
    • 1 - Prevent expansion of the string as a directory name
    • 2 - Force expansion of the string as a directory name

returns

List of paths in OpenVMS style

unixtime(vms_time:int)->int

Converts OpenVMS system time to the Unix local time.

parameters

  • vms_time:int OpenVMS system time

returns

Unix time

vmstime(unix_time:int)->int

Converts Unix time to the OpenVMS system time.

parameters

  • unix_time:int Unix time

returns

OpenVMS system time

vms.ile3

vms.lib

vms.sys

rdb