MCPcopy Create free account
hub / github.com/SimpleITK/SimpleITK / directory

Function directory

Examples/DicomConvert/DicomConvert.py:95–99  ·  view source on GitHub ↗

Custom argparse type for directory.

(dir_name)

Source from the content-addressed store, hash-verified

93
94
95def directory(dir_name):
96 """ Custom argparse type for directory. """
97 if not os.path.isdir(dir_name):
98 raise argparse.ArgumentTypeError(dir_name + " is not a valid directory name")
99 return dir_name
100
101
102def main(argv=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected