This document explain how to set up vscode for with pymanager, python 3.14-32 and use the libraries described in this book.

Setup pymanager to install python

Open a command prompt and check if you already have pymanager

pymanager list

if you get a command not found you need to install it, if there is a list of version you should look for python 3.14-32 or 3.14[-32] means you are good

winget install 9NQ7512CXL7T --disable-interactivity --accept-source-agreements --accept-package-agreements --silent
  or just
winget install 9NQ7512CXL7T

This basically install the pymanager if not there. The first is no questions asked and no output, the second it starts installation and ask you questions.

Install python 3.14-32

This is now just a pymanager command away. Yo can use that to update and install different versions. It will also give you a list of names to use to get the correct version and set the one you want to use.

pymanager install 3.14-32 --yes
  or to update a version do 
pymanager install 3.14-32 --yes --update
Setup a venv to work in

When you want to use packets with python, you are better of if you just set up a virtual environment for each of your projects instead of working with the main intepreter (the installed python.exe). It works like you have got a clean install every time. To do this you have to use some commands to set it up and for that you need to know you python.exe to use.

pymanager list -f=exe =3.14-32
  or to find a global exe name look for it in 
pymanager list

this will list the exact path the the 3.14-32 that you have installed. You can also use the one found in list and to be sure use the full python3.14-32.exe alias.

python3.14-32.exe -m venv "x:\fullpathtowhereyouwnatyourproject"
  or create a folder go to it and run
python3.14-32.exe -m venv .

You can now continue in the command line by calling Scripts\activate.bat for cmd or Scripts\Activate.ps1 for powershell, but we are creating some files so I suggest to continue in vscode.

Set up vscode for working with the project

If you not wave installed the python extentions, do that first. My suggestions are the standard Microsoft ones "Python", "Python Debugger", "Pylance" and "Python Environments". 

If you are using powserrshell as terminal, make sure you open one in admin mode before you use vscode and set the rights to let vscode set your environment. This is the command.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Since you are using powsershell I assume you have set it up to actually be able to do something before, if not follow the institutions in the first you open.

First we need to set up for using our extra pip by setting a pip.ini in the root of the project.

[global]
extra-index-url = https://download.2imply.com/python3

This will let you use our extra pip repo for dataease and to 2imply wheels.

Next set up you project definition by creating a pyproject.toml file in the root of the project or simply do a pip install debprism9 debdata3 and a main.py file and start working.

[project]
name = "myproject"
version = "0.1.0"
dependencies = [
"debprism9",
"debdata3"
]
[tool.setuptools]
py-modules = ["main"]

Give it a proper name and add what you will install. The two in the example is to use prism9 to connect to LE9 and deserver9 apps. The debprism9 is the core to use prism9 and debdata3 is a simplification of using any prism with the same code.

from debprism9 import PrismConnector
from debdata3 import getrepo

licensepath = "C:\\ProgramData\\DataEase\\deserver9"
repopath = "C:\\Data\\YourAppPath"
reponame = "YourAppName"
repoun = ""
repopw = ""

try:
gprism = PrismConnector()
if gprism.initprism():
#set the license path to same as deserver9
gprism.getprism().runfunction("DEOS", "@setlicensepath", licensepath)
print("all ok prism started")
else:
print("you could not start prism")

repo = getrepo(repopath, reponame, repoun, repopw, gprism)
print("Repository is open")
tlist = repo.tablelist()
for t in tlist:
print(t)
except Exception as e:
print(e)
code = str(e).split(':')[0]
if code == '105':
print ("License path used: %s" % gprism.getprism().runfunction("DEOS", "@getlicensepath"))

Next you need a main.py to pull it all together

Now open your terminal in vscode and make sure you see it change to having a green (someprojectname)  in the start indicating it has activated the venv. If not you will have to do this manually by Scripts\activate.bat in cmd or ./Scripts/activate.ps1 in powershell.

pip install -e .

Then you are ready to start your project.