Spell-checking Python source code
musiccomposition at gmail.com
Mon Sep 10 04:18:51 CEST 2007
On Sep 8, 4:04 pm, John Zenger <johnzen... at gmail.com> wrote:
> To my horror, someone pointed out to me yesterday that a web app I
> wrote has been prominently displaying a misspelled word. The word was
> buried in my code.
> Is there a utility out there that will help spell-check literal
> strings entered into Python source code? I don't mean spell-check
> strings entered by the user; I mean, go through the .py file, isolate
> strings, and tell me when the strings contain misspelled words. In an
> ideal world, my IDE would do this with a red wavy line.
> I guess a second-best thing would be an easy technique to open a .py
> file and isolate all strings in it.
> (I know that the better practice is to isolate user-displayed strings
> from the code, but in this case that just didn't happen.)
This is when it's good to use put all your UI strings in a file and
get the advantages of spelling checking ease and the ability to
translate the app.
More information about the Python-list