You need to put quotes in your scripts. Something like this:

"win = 'test'\nif mc.window(win, exists=True):\n mc.deleteUI(win)\n"


Otherwise, \n is treated as a literal, not a new line character.

On Mon, Jun 19, 2017 at 3:28 AM, Eri <td.eri...@gmail.com> wrote:

> Hi:
>
>
> I ran using a script to create the Shelf,
> I wrote multiple lines of commands using the escape character.
> After creation, the escape character is found to be written directly to
> the command.
>
>
> <https://lh3.googleusercontent.com/-OhCErZxzJlI/WUbTbyP2p2I/AAAAAAAAAhw/20h7OMNeJSYLiGRqq7wKq0WL3kkIksGfACLcBGAs/s1600/a.png>
>
>
> After clicking shelf button ,Maya prompts an error
>
> # Error: unexpected character after line continuation character #
>
> <https://lh3.googleusercontent.com/-N84FocsU6xg/WUbT3zXZizI/AAAAAAAAAh0/JF9SWYJCaJA-QIWxvgiZ5YGswUdGU6f-QCLcBGAs/s1600/b.png>
>
>
> Why is there such an error, if the solution?
>
>
>
> Thank you !!
>
>
> EriLee
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/b70c22c1-7bd4-4074-9d80-
> 851ec3d09e60%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/b70c22c1-7bd4-4074-9d80-851ec3d09e60%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



--

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPaTLMSGY0gCaoQJHQL-vANuuy2GrT7SxwrYHxor-2afdZG8Zg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to