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.

VannyJ
  • 67
  • 4
  • 9
  • if nothing is displayed, it means that you do not have any syntax errors and your script can be run. – ikamen Jan 29 '19 at 14:13

1 Answers1

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.

Blackberry
  • 161
  • 10