howto add a sub-directory to the searchpath / namespace ?

Scott David Daniels Scott.Daniels at Acm.Org
Fri Oct 12 04:23:56 CEST 2007


[david] wrote:
> r" indicates a 'regular expression' string, normally
> called a raw string. It means that \ characters are
> treated using the regex syntax rather than the c syntax.

This is an incredibly creative answer , if not fastidiously
correct.  Raw strings simply disable the special effects of
backslash (\) within the string (except that it cannot be
the final character of a quoted string even if it a raw string
for technical lexer (tokenizer) simplicity reasons).  The regex
syntax is used on the resulting string constant if (and only if)
the string is passed to the regular expression functions as a
regex pattern parameter.

-Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list