Eval and raw string ??
sentientholon at gmail.com
Wed Aug 22 18:09:39 CEST 2007
On Aug 22, 11:06 am, Mark <cree... at gmail.com> wrote:
> Eval() doesn't seem to recognize the r'string' format. Is there a way
> around this.
> If I input: ---------> eval("r'C:\tklll\ndfd\bll'")
> I get the output:
> Traceback (most recent call last):
> File "<pyshell#3>", line 1, in <module>
> File "<string>", line 1
> r'C: klll
> SyntaxError: EOL while scanning single-quoted string
> The same principle applies for exec.
> Thanks in advance,
The r'' format is purely for the interpreter; eval wouldn't know the
Your problem is that eval and exec evaluate source. You're trying to
More information about the Python-list