NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand 2021 importing modules from other files using sys.path.append()

Hi,

 

So i have been trying to use the native TestStand interpreter to run a Python File that has sys.path.append() used in the file system to find a file that is one folder above (the file is also 1 folder below the sequence file). This works when the python file is just imported into the TestStand Sequence, however, once TestStand is restarted then the file shows no module named "modulename".

 

The Code looks like this 

 

# importing sys
import sys

sys.path.append("../")

# importing the add and odd_even
# function
from argparsetest import odd_even, add

0 Kudos
Message 1 of 1
(653 Views)