When I use the write() function of the Turtle graphics library in a Python script and then translate it in javascript with Transcrypt, it displays nothing.
My code looks like this:
import turtle
def SomeText():
pen.goto(0, 250)
pen.pensize(10)
pen.write("Nothing happens")
pen = turtle.Turtle()
SomeText()
pen.done()
The program runs alright in a Python environment but it displays only the turtle line and no text when translated into Javascript through Transcrypt and then is executed on a web browser.
Am I doing something wrong or is it just that Transcrypt doesn't support the write() function? If this is the case, how can I combine the turtle graphics with text in a compact way into Javascript? It's not that convenient to use extra html code for text messages.
hm.... I don't know if I'm right, as I have left turtle quite a while ago, but aren't you supposed to add a lot more after just
pen.write("nothing happens")? For example:pen.write("something happens", True, 'center', font = ([whatever font], [whatever size], 'bold' [or not]))That may be the problem, but like I said before, I'm not too familiar with turtle and I've also never used Transcript or JavaScript.