Hello,
You need to escape your backslash in your split method arg:
wPath = "C:\workFolder\shots\renderFolder"
wPath.split('\\')[:4]
-Ean
On Tue, May 15, 2012 at 9:39 PM, Noggy
<[email protected]>wrote:
> **
> Thanks! Now I get it. Does split only work on a list? I am getting an
> error trying to use split on a string. There's something about this that
> isn't clicking for me.
>
> wPath = "C:\workFolder\shots\renderFolder"
> wPath.split('\')[:4]
>
> SyntaxError: EOL while scanning string literal
>
> _______________________________________________
> 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