Given a file contains lines such as:
(?i:\bsys\.user_catalog\b)
While reading those line, I want the value to be a raw string (unescaped), meaning, in memory, line should be
r'(?i:\bsys\.user_catalog\b)'
instead of
(?i:\bsys\.user_catalog\b)
Which is escaped when passed over to libs such as sqlobject.
For instance, with sqlobject, if I state
Table(column=r'(?i:\bsys\.user_catalog\b)')
I get the desired results while if I state
Table(column='(?i:\bsys\.user_catalog\b)')
I do not.
So question is basically, I can I pass a raw string when I am not in declarative/assignment mode (e.g. a = r'string'
), rather, the string is already in memory.