def ensure_sys_path_contains(paths):
 for entry in paths:
  if isinstance(entry, (list, tuple)):
   ensure_sys_path_contains(entry)
  elif ((entry is not None) and (entry not in sys.path)):
   sys.path.append(entry)

def ensure_sys_path_contains ( paths ) : for entry in paths : if isinstance ( entry , ( list , tuple ) ) : ensure_sys_path_contains ( entry ) elif ( ( entry is not None ) and ( entry not in sys . path ) ) : sys . path . append ( entry )
ensure that os .