mirror of
https://codeberg.org/privacy1st/exec-notify
synced 2024-12-22 23:16:04 +01:00
16 lines
302 B
Python
16 lines
302 B
Python
import os
|
|
from pathlib import Path
|
|
|
|
|
|
def getProjectBase() -> Path:
|
|
return Path(os.path.realpath(__file__)).parent.parent
|
|
|
|
|
|
def readFirstLine(file: Path) -> str:
|
|
"""
|
|
:param file: Path to file
|
|
:return: first line of file
|
|
"""
|
|
with open(file, "r") as f:
|
|
return f.readline()
|