Animate a word with an apostrophe
-
Hi !
I'm trying to animate with drawbot a French word with an apostrophe "d'étude". Do you know how I can do that in the code ? Because it takes the apostrophe as the end of the word and animate only the "d" ! ...
Thank you
-
I would try typing a backslash \ before the apostrophe. I think that's the escape character Python uses to indicate the ensuing character is still part of the string.
-
could you provide an example where a word is split at the
'
mark?
-
It would also probably work to use double quotes as your delimiters. I think
text("d'etude", (x, y))
works but
text('d'etude', (x, y))
won't.
-
see the python courseware about strings: https://www.drawbot.com/content/courseware.html#strings
you can not have the same quote mark inside a string and to indicate a string.
print("d'étude") print('d"étude') print('d\'étude') # escaping '
good luck!