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:
11
scripts/util.py
Normal file
11
scripts/util.py
Normal 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)
|
||||
Reference in New Issue
Block a user