How can I check the syntax of Python code in Emacs without actually executing it?

后端 未结 5 2099
醉话见心
醉话见心 2021-02-01 23:28

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 ru

5条回答
  •  青春惊慌失措
    2021-02-01 23:36

    Or from emacs (or vim) you could run python -c 'import x' where x is the name of your file minus the .py extension.

提交回复
热议问题