Python's IDLE has 'Check Module' (Alt-X) to check the syntax which can be called without needing to run the code. Is there an equivalent way to do this in Emacs instead of running and executing the code?
You can use pylint, pychecker, pyflakes etc. from Emacs' compile command (M-x compile).
Hint: bind a key (say, F5) to recompile.
How can I check the syntax of Python code in Emacs without actually executing it?