Michael Yanowitz schrieb: > Yeah, I am operating this on a Python script. However, I am working off > a requirement that the script be pre-processed and the strings replaced > before executing the script and that if there are any remaining (not > replaced) > names that I don't execute the script and report that some 'mnemonics' have > not been replaced.
If you control the source(template), you could use string formatting. http://docs.python.org/lib/typesseq-strings.html You would have to rewrite your MNEMONIC as %(MNEMONIC)s . An exception will be raised if you miss a replacement and you are sure you do not replace anything by accident. Leonhard -- http://mail.python.org/mailman/listinfo/python-list