I'm new to python development and the mindset for Python in general, so I'm still learning the generally accepted practices of the language and infrastructure. Background on the problem:
I have installed into Windows Python, pip, etc. as well as the module pymeasure, which provides a good start for controlling bench equipment through python. This module is not equipment comprehensive, however, and I need to develop my own additional scripts within the pymeasure framework to specifically control the equipment I use. I have created a (very rough) sketch of control code for an Agilent E3647A power supply. When I located the python script in the module directory (buried far into my userspace folder structure) everything was fine.
I will be developing software as part of a larger group of developers, all of whom will be sharing code through an internal git repository. Any code we create (not downloaded from git) should be located in the git repository. Ergo, my E3647A script should be in the repo folder (somewhere).
Failed __init__
implementation
In copy/paste form:
from .agilent8257D import Agilent8257D
from .agilent8722ES import Agilent8722ES
from .agilentE4408B import AgilentE4408B
from .agilentE4980 import AgilentE4980
from .agilent34410A import Agilent34410A
from .agilent34450A import Agilent34450A
from .agilent4156 import Agilent4156
from .agilent33220A import Agilent33220A
from .agilent33500 import Agilent33500
from .agilent33521A import Agilent33521A
from .agilentB1500 import AgilentB1500
from 'C:\Bench_Software\Equipment\Equipment Single Commands\agilentE3647A' import AgilentE3647A
The above attempt to add a non-local script into __init__
fails miserably.
How (if possible) can I specify absolute paths to module scripts, or change my entire Python target for modules to look for multiple directories, split existing modules along pip-downloaded vs. locally-developed code? Are there any standard code practices to achieve such a thing?