update/cleanup Python dev scripts

- put common code in its own util.py file
- same Python3 shebang for all scripts
- add file docstrings
- fix format string replacement fields in man page template
This commit is contained in:
Mike Fährmann
2019-04-16 18:16:48 +02:00
parent 7973419b54
commit 96c7ccd380
6 changed files with 41 additions and 38 deletions

11
scripts/util.py Normal file
View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
import sys
import os.path
ROOTDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, os.path.realpath(ROOTDIR))
def path(*segments, join=os.path.join):
return join(ROOTDIR, *segments)