Use 'r' to prefix your string when you actually set the variable. If you
want to convert to a raw string, use the encode method. Compare:
s1 = "\n\tfoo"
s2 = r"\n\tfoo"
s3 = s1.encode('string-escape')
print s1
print s2
print s3
-E
On Tue, May 15, 2012 at 11:00 PM, Noggy
<[email protected]>wrote:
> **
> First off, you guys are awesome. Thanks for answering my simple questions.
>
> I get the // and r format issues. What if my string is stored in a
> variable? What's the syntax to use r, when the variable is myVar?
>
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python