Re: Removing comments... tokenize error

2005-04-13 Thread qwweeeit
My code, besides beeing cumbersome and criptic, has another quality: it is buggy! I apologize for that; obviously I discovered it after posting (in the best tradition of Murphy's law!). When I will find the solution I let you know, also if the problem is made difficult for the fact that the for cyc

Re: Removing comments... tokenize error

2005-04-13 Thread qwweeeit
Thanks! If you answer to my posts one more time I could consider you as my tutor... It was strange to have found a bug...! In any case I will not go deeper into the matter, because for me it's enough your explanatiom. I corrected the problem by hand removing the tokens spanning multiple lines (

Re: Removing comments... tokenize error

2005-04-12 Thread Fredrik Lundh
"qwweeeit" <[EMAIL PROTECTED]> wrote: > I don't know if this has already been corrected (I use Python 2.3) > or perhaps is a mistake on my part... it's a mistake on your part. adding a print statement to the for- loop might help you figure it out: > nLastLine=0 > for i in tokenize.generate_toke