Turtle Subclass "Objekt hat kein Attribut '_shown'" [Duplikat]Python

Python-Programme
Anonymous
 Turtle Subclass "Objekt hat kein Attribut '_shown'" [Duplikat]

Post by Anonymous »

Neu bei Python hier.

Code: Select all

AttributeError: 'Buttons' object has no attribute '_shown'
< /code>
Mein Python -Skript: < /p>
import turtle

wn = turtle.Screen()
wn.bgcolor("black")
wn.setup(width=800, height=600)
wn.tracer(0)

class Buttons(turtle.Turtle):
def __init__(self, color, text):
self.hideturtle()
self.color(color)
self.shape('square')
self.shapesize(stretch_wid=3, stretch_len=7)
self.penup()
self.goto(0, 0)
self.stamp()
self.color('white')
self.goto(0, 0 - FONT_SIZE/2)
self.write(text, align='center', font=FONT)

t1 = Buttons("green", "start")

while True:
wn.update()

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post