Python 2.3.5 (#2, Sep 4 2005, 22:01:42) [GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from views.debug import linebreak_iter >>> src = """blah ... blub# ... anton ... berta ... """ >>> for row in linebreak_iter(src): ... print row ... 0 5 11 17 23 24