M BUZZ CRAZE NEWS
// general

Syntax Checking in Notepad++

By Emma Johnson

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?

1

4 Answers

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.

2

For Python (also Perl, PHP, Ruby, Javascript) development, I would recommend using Activestate Komodo IDE - it is very powerful, has live syntax checking, code completion, debugger, regex toolkit, works and looks almost identical on Windows, Mac and Linux, etc.

However, Komodo IDE is commercial tool and is not free (it costs $200+). Fortunately, there is free open source flavor of it called Komodo Edit. It still has the same great live syntax checker and syntax highlighter, but it does not have Python debugger. Give it a try - it is very good editor.

Also consider using SynWrite editor, it has simpler external tools configuring. You can also call PyLint tool ang go to errors, but easier than in Notepad++, maybe.

If you are using the Anaconda Environment Spyder provides a very useful and helpful Syntax checker that does exactly what you have been Looking for

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy