I'm trying to create a text typing effect in a window, however it comes up as "TypeError: 'Text' object is not iterable". Here's my current code:
from graphics import *
import sys
from time import sleep
window = GraphWin('Test', 1000, 700)
text = Text(Point(500, 150), "This is just a test :P")
words = ("This is just a test :P")
for char in text:
sleep(0.1)
sys.stdout.write(char)
sys.stdout.flush()
word.draw(window)
The text comes up in the shell if I use the 'words' variable, however becomes a TypeError if I try using the text variable. Is there a way of making it iterable?