lib.py: use a consistent format