0

I'm writing just a simple Python 3 program (beginner here) and I want to syntax check the code rather than just run it and see errors. How can I do this?

I've done python3 -m py_compile sender.py but nothing changes or is displayed. I'm using version 3.5.2 in Ubuntu, and sender.py is in the directory that I'm currently in.

1
  • if nothing is displayed, it means that you do not have any syntax errors and your script can be run. Commented Jan 29, 2019 at 14:13

1 Answer 1

1

There are some Python editors than can do this. For example, Spyder and PyCharm. They highlight the code segments that have problems.

If you are looking for tools similar to regular compilers, then you can have a look at this stackoverflow question and this with good answers.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.