py: Add traceback info to syntax errors.

Should fix issue #463.