qwweeeit wrote: > I need your help in correctly identifying the strings (also embedding > the r'xx..' or u'yy...' as part of the string definition). The problem > is mainly on the multi-line definitions or in cached strings > (embedding chr() definitions or escape sequences). >
Have a look at tokenize.generate_tokens() in the standard library. That ought to give you enough information to identify the strings reliably and output modified source. -- http://mail.python.org/mailman/listinfo/python-list