remove strings from source

qwweeeit qwweeeit at yahoo.it
Mon Mar 21 18:47:18 CET 2005


I am in debt with you of an answer on " my" solution in removing
literal strings...
I apologize not to have followed your suggestions but I am just
learning Python, and your approach was too difficult for me!
I've already developed the cross reference tool, and for that I
identified two types of literals (the standard one  which I named in
general s~ and the multi-line or triple quoted strins, which I called
m~).

You can see a step in my appproach to the solution in an answer to
Fredrik Lundh
http://groups.google.it/groups?q=qwweeeit&hl=it&lr=&group=comp.lang.python.*&selm=2ab23d7a.0503190647.2c15c281%40posting.google.com&rnum=2

After that I have almost completed the application, and better than
explanations you can see the result (a small extract).

052         PROGNAME: PROGNAME = sys.argv[0]
053           AUTHOR: AUTHOR = us~.encode(s~)
054          VERSION: VERSION = s~
056         URL_BASE: URL_BASE = s~
057      OUTPUT_HTML: OUTPUT_HTML = s~   etc...

The cross references are mainly useful for variables, but I use them
also for Python reserved words, to learn the language and also classes
and functions.

For small applications there is no need for my toool, but with a
source of almost 1 Mb... (like Pysol).
Excuse if I don't go deeper in my solution for removing strings, but
it is so standard that there is nothing to learn ...

Bye.



More information about the Python-list mailing list