Syntax Checking in Notepad++

notepadpython

I am currently programming Python on Notepad++. Many times I have been bogged down by typos and misspellings. It's becoming frustrating to find those errors when writing so many lines of code. Is there syntax checking for Notepad++? I know a SO user offered a script like this:

console.show()
console.clear()
console.run('cmd.exe /c '
            + 'C:\\Python27\\Scripts\\pylint.bat --reports=n -f parseable '
            + '"%s"' % notepad.getCurrentFilename())

But when I added it to Notepad++, created an icon out of it, nothing happened. How do I use this script?

Best Answer

First install Pylint and its dependencies. I also added pylint.bat to Python27/Scripts. Downloaded Python Scripts. Then go to Show Console under Plugins and Scripts. Make sure to have a .py file open. Enter in

console.run('cmd.exe /c ' + 'C:\Python27\Scripts\pylint.bat --reports=n -f parseable ' + '"%s"' % notepad.getCurrentFilename())

And it will give you a list of errors.

Related Question