import sys new_path = '/home/emma/user_defined_modules' if new_path not in sys.path: sys.path.append(new_path)