1748104 Members
4707 Online
108758 Solutions
New Discussion юеВ

Re: Python and OpenVMS

 
George Javier
New Member

Python and OpenVMS

I have a Python script that is UNIX/LINUX centric. In short, it creates a module to connect to an Oracle Database. However, it does not translate directory-type logicals in the VMS fashion (ex. disk1:[oracle_home] vs. /disk1/oracle_home/). It is looking for a UNIX style directory structure. Is there a way to make a local session "think" in this UNIX/LINUX fashion? If more of an explanation is needed, please let me know. Thanks
3 REPLIES 3
Hoff
Honored Contributor

Re: Python and OpenVMS

The C run-time library that's underneath most of these environments allows direct access to Unix-format file specifications on OpenVMS; did you try /disk1/oracle_home under Python?

Otherwise, please post up the Python kit identity and the OpenVMS versions and architecture, and a short example reproducer of what you're trying to do here.

George Javier
New Member

Re: Python and OpenVMS

Thanks.. This may have solved my issue. I am waiting for a C compiler to be placed on our system to see if the module truly compiles correctly...
Jean-Fran├зois Pi├йronne
Trusted Contributor

Re: Python and OpenVMS

Python on OpenVMS use Unix style filename, this allow to port more easily Unix application on OpenVMS.
But it also provide routines to convert filename from one environment to the other:

$ python
Python 2.5.2 (r252:60911, Aug 2 2008, 10:38:44) [DECC] on OpenVMS
Type "help", "copyright", "credits" or "license" for more information.
>>> import vms.crtl
>>> print vms.crtl.to_vms.__doc__
to_vms(name) -> vms_name

Converts UNIX style file specifications to OpenVMS file specifications.
>>> print vms.crtl.from_vms.__doc__
from_vms(name) -> unix_name

Converts OpenVMS style file specifications to Unix file specifications.
>>>

JF