MCPcopy Create free account
hub / github.com/Kitware/VTK / check_paths

Function check_paths

Utilities/Maintenance/WhatModulesVTK.py:34–57  ·  view source on GitHub ↗

Check that the paths are valid. :param vtk_src_dir: The path to the VTK source. :param application_srcs: The user source files to be scanned for modules. :return: True if paths, files exist.

(vtk_src_dir, application_srcs)

Source from the content-addressed store, hash-verified

32
33
34def check_paths(vtk_src_dir, application_srcs):
35 """
36 Check that the paths are valid.
37
38 :param vtk_src_dir: The path to the VTK source.
39 :param application_srcs: The user source files to be scanned for modules.
40 :return: True if paths, files exist.
41 """
42 ok = True
43 if not Path(vtk_src_dir).is_dir():
44 print('The path to your VTK Source folder does not exist.')
45 print(Path(vtk_src_dir))
46 ok = False
47 bad_paths = list()
48 for f in application_srcs:
49 p = Path(f)
50 if not (p.is_dir() or p.is_file()):
51 bad_paths.append(p)
52 if bad_paths:
53 print('These application paths or files do not exist.')
54 for p in bad_paths:
55 print(p)
56 ok = False
57 return ok
58
59
60def find_vtk_modules(vtk_src_dir):

Callers 1

mainFunction · 0.85

Calls 4

PathClass · 0.50
printFunction · 0.50
listClass · 0.50
appendMethod · 0.45

Tested by

no test coverage detected