Re: Spell-checking Python source code

2007-09-09 Thread David
On 9/9/07, David <[EMAIL PROTECTED]> wrote: > > tokenize.tokenize( > > file.readline, > > processStrings > > ) > > > > How would you go about writing the output to a file? I mean, I would > > like to open the file at main level and pass a handle to the file to > > processStrings to writ

Re: Spell-checking Python source code

2007-09-09 Thread Benjamin
On Sep 8, 4:04 pm, John Zenger <[EMAIL PROTECTED]> 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

Re: Spell-checking Python source code

2007-09-09 Thread David
> tokenize.tokenize( > file.readline, > processStrings > ) > > How would you go about writing the output to a file? I mean, I would > like to open the file at main level and pass a handle to the file to > processStrings to write to it, finally close output file at main level. > Probably

Re: Spell-checking Python source code

2007-09-08 Thread Miki
>> In an ideal world, my IDE would do this with a red wavy line. > > You didn't mention which IDE you use; however, if you use Emacs, there > is flyspell-prog-mode which does that for you (checks your spelling > "on the fly", but only within comments and strings). Same in Vim (:set spell) HTH, --

Re: Spell-checking Python source code

2007-09-08 Thread David Trudgett
John Zenger writes: > In an ideal world, my IDE would do this with a red wavy line. You didn't mention which IDE you use; however, if you use Emacs, there is flyspell-prog-mode which does that for you (checks your spelling "on the fly", but only within comments and strings). Regards, David Trudg

Re: Spell-checking Python source code

2007-09-08 Thread DaveM
On Sat, 08 Sep 2007 14:04:55 -0700, John Zenger <[EMAIL PROTECTED]> wrote: > In an ideal world, my IDE would do this with a red wavy line. I can't help with your problem, but this is the first thing I turn off in Word. It drives me _mad_. Sorry - just had to share that. DaveM -- http://mail.p

Re: Spell-checking Python source code

2007-09-08 Thread Ricardo Aráoz
David wrote: >>> (I know that the better practice is to isolate user-displayed strings >>> from the code, but in this case that just didn't happen.) >>> >> Use the re module, identify the strings and write them to another file, >> then open the file with your spell checker. Program shouldn't be mor

Re: Spell-checking Python source code

2007-09-08 Thread David
> > > > (I know that the better practice is to isolate user-displayed strings > > from the code, but in this case that just didn't happen.) > > > > Use the re module, identify the strings and write them to another file, > then open the file with your spell checker. Program shouldn't be more > than

Re: Spell-checking Python source code

2007-09-08 Thread Ricardo Aráoz
John Zenger 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 do