pydngconverter.utils¶
Utility functions for PyDNGConverter.
Functions
|
Ensure provided path exists and is a directory. |
|
execute sync function in ‘awaitable’ thread. |
|
Locates program path by name. |
|
Async variant of timeit. |
-
pydngconverter.utils.ensure_existing_dir(path)¶ Ensure provided path exists and is a directory.
- Parameters
path (
Union[str,Path]) – path to check- Returns
Path object. NoneType: If path does not exists or is not a directory
- Return type
Path
-
pydngconverter.utils.force_async(fn)¶ execute sync function in ‘awaitable’ thread.
-
pydngconverter.utils.locate_program(name)¶ Locates program path by name.
- Parameters
name (str) – Name of executable
- Returns
Pathlike Object to Program NoneType: If no suitable path is found
- Return type
pathlib.Path
-
pydngconverter.utils.timeit(func)¶ Async variant of timeit.