qualisys / qtm-scripting

6 stars 3 forks source link

tools are not loaded after demo_scripts #2

Closed ilya112358 closed 1 year ago

ilya112358 commented 1 year ago

If startup_tools.py is loaded after startup_demo_scripts.py, for example, if I want to load both like this: image I get the following: image The culprit is here: https://github.com/qualisys/qtm-scripting/blob/113ef154d4d3f1ef03cca46110dd53a1855c9807/startup_tools.py#L13C29-L13C29

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.

ulvs commented 1 year ago

Hi, Thanks for the feedback, this is addressed in pull request #3