diff options
| author | Pinapelz <yukais@pinapelz.com> | 2024-02-24 00:56:13 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2024-02-24 00:56:13 -0800 |
| commit | 6158616b53a41b8d9491515c38d071e602d83d5b (patch) | |
| tree | 7e5062cb71fdd6b910fa859cecd9739a414b0a89 /data_writer.py | |
| parent | 5309609c7b00d33b064ad48d2185bf06cec503e6 (diff) | |
implement auto generated timestamp based on msg rate
Diffstat (limited to 'data_writer.py')
| -rw-r--r-- | data_writer.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/data_writer.py b/data_writer.py new file mode 100644 index 0000000..e74cb89 --- /dev/null +++ b/data_writer.py @@ -0,0 +1,10 @@ +import os +class DataWriter: + def __init__(self, filepath: str): + self.filepath = filepath + with open(self.filepath, "w") as f: + f.write("") + + def write(self, data: str): + with open(self.filepath, "a") as f: + f.write(data)
\ No newline at end of file |
