Getting absolute path of current script in Python

 

Getting absolute path of current script in Python

from pathlib import Path
script_path = Path(__file__).resolve().parent
print(f"Script path is {script_path}")

Comments

Popular posts from this blog

QTreeView and QTableView dynamic changes

C++ strings and string_view