VannyJ
VannyJ

Reputation: 75

How to syntax check Python?

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.

Upvotes: 0

Views: 5430

Answers (1)

Blackberry
Blackberry

Reputation: 161

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.

Upvotes: 1

Related Questions