Hacker News new | comments | show | ask | jobs | submit login

Wow, I can't believe python doesn't have something similar to ruby's

    ruby -c foo.rb

Third party tools like the excellent pylint exist. And of course, your unit tests should verify that your code is free of syntax errors too, right?

Only problem is, the guy edited the code directly on the live server without testing.

Turns out there is a compileall.py script in the standard distribution that does the trick; there is also the py_compile module and the 'compile' function (though it takes a string).

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact