1 | #!/usr/bin/env python2 |
2 | """util.py.""" |
3 | from __future__ import print_function |
4 | |
5 | import sys |
6 | |
7 | # Note: from typing import Any causes ImportError when PYTHONPATH is not .:vendor |
8 | # So we import from vendor.typing which is a little inconsistent |
9 | from vendor.typing import Any |
10 | |
11 | |
12 | def log(msg, *args): |
13 | # type: (str, Any) -> None |
14 | if args: |
15 | msg = msg % args |
16 | print(msg, file=sys.stderr) |