[Info-vax] VMS Python: Calling sys$trnlnm()

Jan-Erik Söderholm jan-erik.soderholm at telia.com
Fri Mar 27 18:51:40 EDT 2020


Den 2020-03-27 kl. 19:49, skrev Simon Clubley:
> On 2020-03-27, Dave Froble <davef at tsoft-inc.com> wrote:
>> On 3/27/2020 7:58 AM, VAXman- at SendSpamHere.ORG wrote:
>>> ... and all of this is considered readable and maintainable? :(
>>>
> 
> Yes. Mostly.
> 
> The struct stuff requires a little care to make sure you don't create
> something unreadable, but the rest of it is very readable Python.
> 
> You will need to look at the documentation to see how to call trnlnm()
> but that's no different from calling it from C.

And, if you do not need all the options, you can use the lib$get_logical
interace in Python which has a simpler interface.

http://www.vmspython.org/doku.php?id=vmsrtlexample


> 
> Calling trnlnm() by itself without any prefix looks a little unusual
> to someone used calling system services from C or another language,
> but it's documented right there in the from statement at the top of
> the program where that was imported from.
> 
>>
>> WHAT!
>>
>> You didn't notice all those comments in the example code to explain
>> what's happening ?
>>
>> Oh, wait ....
>>
>> Ok, I'll admit, I cannot read Python, nor do I understand Python ...
>>
> 
> Python has some very nice high level datatype constructs which allows
> you to write clean and highly functional code without a lot of
> boilerplate code.
> 
> Here are some examples from the Python 2 manual:
> 
> https://docs.python.org/2/tutorial/datastructures.html
> 
> Simon.
> 




More information about the Info-vax mailing list