Jan-28-2019, 08:45 AM
This is the idea :
- I show a picture via Tkinter : no problem
- I want the program to wait for e.g. 3 seconds
- and then show the next picture, (and so on like a slide show) I have only 2 pics in this code extract.
Problem: I can show the first picture,
but when i add the sleep funtion and the second picture,
it does not show the first pic any more: just sleeps and shows the second picture? Help?
- I want the first picture to keep showing for 3 secs and then show the next.
- I show a picture via Tkinter : no problem
- I want the program to wait for e.g. 3 seconds
- and then show the next picture, (and so on like a slide show) I have only 2 pics in this code extract.
Problem: I can show the first picture,
but when i add the sleep funtion and the second picture,
it does not show the first pic any more: just sleeps and shows the second picture? Help?
- I want the first picture to keep showing for 3 secs and then show the next.
img = ImageTk.PhotoImage(PIL.Image.open(p / 'pic.jpeg')) fotoLabel = Label(tk, bg = 'black', image = img) fotoLabel.pack(fill = "both", expand = "yes") time.sleep(3) img = ImageTk.PhotoImage(PIL.Image.open(p / 'b.jpg')) fotoLabel.configure(image = img) tk.mainloop()