emdbg.utils
1# Copyright (c) 2023, Auterion AG 2# SPDX-License-Identifier: BSD-3-Clause 3 4from __future__ import annotations 5from pathlib import Path 6 7 8def add_datetime(filename: Path | str): 9 """ 10 Appends a filename with the current date and time: 11 `Year_Month_Day_Hour_Minute_Second` 12 13 Example: `path/name.txt` -> `path/name_2023_04_14_15_03_24.txt` 14 """ 15 from emdbg.debug.px4.utils import add_datetime as _dt 16 return _dt(filename)
def
add_datetime(filename: pathlib.Path | str):
9def add_datetime(filename: Path | str): 10 """ 11 Appends a filename with the current date and time: 12 `Year_Month_Day_Hour_Minute_Second` 13 14 Example: `path/name.txt` -> `path/name_2023_04_14_15_03_24.txt` 15 """ 16 from emdbg.debug.px4.utils import add_datetime as _dt 17 return _dt(filename)
Appends a filename with the current date and time:
Year_Month_Day_Hour_Minute_Second
Example: path/name.txt
-> path/name_2023_04_14_15_03_24.txt