For a python code I am writing I need to remove all strings definitions from source and substitute them with a place-holder.
To make clearer: line 45 sVar="this is the string assigned to sVar" must be converted in: line 45 sVar=s00001 Such substitution is recorded in a file under: s0001[line 45]="this is the string assigned to sVar" For curious guys: I am trying to implement a cross variable reference tool and the variability (in lenght) of the string definitions (expecially if multi-line) can cause display problems. 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). -- http://mail.python.org/mailman/listinfo/python-list