OILS / doctools / util.py View on Github | oils.pub

16 lines, 7 significant
1#!/usr/bin/env python2
2"""util.py."""
3from __future__ import print_function
4
5import 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
9from vendor.typing import Any
10
11
12def log(msg, *args):
13 # type: (str, Any) -> None
14 if args:
15 msg = msg % args
16 print(msg, file=sys.stderr)