#!/bin/sh
dir=${1:-.}

find "$dir" -type f -name '*.py' | python -c '
import sys
import compiler

for f in sys.stdin:
	print "Checking " + f,
	fd = open(f.strip())
	c = fd.read()
	fd.close()
	try:
		compiler.parse(c)
	except SyntaxError, e:
		print "%s: %s" % (f, e)
		raise
'
