2 ms·
Wow, I can't believe python doesn't have something similar to ruby's ruby -c foo.rb
by anewaccountname 19y ago
Wow, I can't believe python doesn't have something similar to ruby's
ruby -c foo.rb
- inklesspen 19y agoThird 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.
- anewaccountname 19y agoTurns 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).