VMS IDE - Python import

Here you can discuss the universal Integrated Development Environment for OpenVMS.
Post Reply

Topic author
andrew_shaw
Member
Posts: 5
Joined: Thu Jun 13, 2019 7:16 pm
Reputation: 0
Location: Melbourne, Australia
Status: Offline

VMS IDE - Python import

Post by andrew_shaw » Fri Apr 17, 2020 3:17 am

Hi guys and gals,

First off - I am very impressed with the IDE.

I've been a VMS dev for many years and always used the bare bones EVE and EDT, so this is my first real foray into the IDE world for VMS.

I'm working on some Python code at the moment that makes calls to some VMS internal stuff and I need to import from the Python vms.starlet module. This worked perfectly OK when I developed and ran this on the VMS box, but now using the IDE the pylint checker is obviously complaining because it doesn't know about the VMS specific modules because its just running on my laptop.

I have the SSH settings setup and it synchs perfectly to my VMS dev box, when I hit synch , but I'm guessing that the pylint tool, out of the box, doesn't know to go check there. Is that something I can set in the IDE somewhere? Or do I just need to basically ignore the "error" and trust that it will work when I run it on the VMS box. In this case I know it will work, but moving forward I would love to be able to pick up errors as early as I can.

Thanks in advance.

Andrew
VMS Evangelist (to those who will listen) :D


sergey_vorfolomeev
VSI Expert
Valued Contributor
Posts: 98
Joined: Thu Aug 22, 2019 12:17 am
Reputation: 0
Status: Offline

Re: VMS IDE - Python import

Post by sergey_vorfolomeev » Fri Apr 17, 2020 6:33 am

1. download VMS specific python modules to PC
2. create .env file in working directory on PC:

Code: Select all

PYTHONPATH=folder with VMS specific python modules
3. reload VS Code


Topic author
andrew_shaw
Member
Posts: 5
Joined: Thu Jun 13, 2019 7:16 pm
Reputation: 0
Location: Melbourne, Australia
Status: Offline

Re: VMS IDE - Python import

Post by andrew_shaw » Fri Apr 17, 2020 6:39 am

Thanks Sergey, I will implement that - I really appreciate your prompt feedback.

Kind regards,

Andrew
VMS Evangelist (to those who will listen) :D


sergey_vorfolomeev
VSI Expert
Valued Contributor
Posts: 98
Joined: Thu Aug 22, 2019 12:17 am
Reputation: 0
Status: Offline

Re: VMS IDE - Python import

Post by sergey_vorfolomeev » Fri Apr 17, 2020 7:03 am

to correct python linter (pylint) do the following:
1. create config file for linter:

Code: Select all

python -m pylint --generate-rcfile > .pylintrc
2. in given config file find line with 'init-hook' and edit it like that:

Code: Select all

init-hook='import sys; sys.path.append("c:\\path\\to\\modules")'
3. reload vs code

PS: it would help, but unfortunately it doesn't.
Last edited by sergey_vorfolomeev on Fri Apr 17, 2020 7:28 am, edited 2 times in total.

Post Reply