if this_dir not in sys.path:
sys.path.append(this_dir)
sys.path.append(os.path.join(this_dir,"tools"))
sys.path.append(os.path.join(this_dir,"user"))
If startup_demo_scripts.py has been loaded before then this_dir is in sys.path thus "tools" subdir is not added to sys.path and modules cannot be found.
If startup_tools.py is loaded after startup_demo_scripts.py, for example, if I want to load both like this: I get the following: The culprit is here: https://github.com/qualisys/qtm-scripting/blob/113ef154d4d3f1ef03cca46110dd53a1855c9807/startup_tools.py#L13C29-L13C29
If startup_demo_scripts.py has been loaded before then this_dir is in sys.path thus "tools" subdir is not added to sys.path and modules cannot be found.