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 IDE - Python import
-
Topic author - Member
- Posts: 5
- Joined: Thu Jun 13, 2019 7:16 pm
- Reputation: 0
- Location: Melbourne, Australia
- Status: Offline
VMS IDE - Python import
VMS Evangelist (to those who will listen)
-
- VSI Expert
- Master
- Posts: 102
- Joined: Thu Aug 22, 2019 12:17 am
- Reputation: 0
- Status: Offline
Re: VMS IDE - Python import
1. download VMS specific python modules to PC
2. create .env file in working directory on PC:
3. reload VS Code
2. create .env file in working directory on PC:
Code: Select all
PYTHONPATH=folder with VMS specific python modules
-
Topic author - Member
- Posts: 5
- Joined: Thu Jun 13, 2019 7:16 pm
- Reputation: 0
- Location: Melbourne, Australia
- Status: Offline
Re: VMS IDE - Python import
Thanks Sergey, I will implement that - I really appreciate your prompt feedback.
Kind regards,
Andrew
Kind regards,
Andrew
VMS Evangelist (to those who will listen)
-
- VSI Expert
- Master
- Posts: 102
- Joined: Thu Aug 22, 2019 12:17 am
- Reputation: 0
- Status: Offline
Re: VMS IDE - Python import
to correct python linter (pylint) do the following:
1. create config file for linter:
2. in given config file find line with 'init-hook' and edit it like that:
3. reload vs code
PS: it would help, but unfortunately it doesn't.
1. create config file for linter:
Code: Select all
python -m pylint --generate-rcfile > .pylintrc
Code: Select all
init-hook='import sys; sys.path.append("c:\\path\\to\\modules")'
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.