#!/usr/bin/env python12'''3Scans current directory for *.py files and reports4ones with missing __doc__ string.5'''67# Python 2/3 compatibility8from __future__ import print_function910from glob import glob1112if __name__ == '__main__':13print('--- undocumented files:')14for fn in glob('*.py'):15loc = {}16try:17try:18execfile(fn, loc) # Python 219except NameError:20exec(open(fn).read(), loc) # Python 321except Exception:22pass23if '__doc__' not in loc:24print(fn)252627