| | |
Python Sleep Function:
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
Hello:
I am trying to use the Python Sleep Function via import time; I get results but not the results I am looking for.
What I am trying to do is rather simple and only for visual effect in a Python GUI: Display GIF --> Sleep (pause) 5-seconds --> Display next GUI --> Repeat. Such as:
What seems to happen is that I do note a pause, in this case roughly 5-seconds, but it happens before the GUI appears at all upon the screen; the canvas should display, then 1-by-1 each GIF should appear 5-seconds apart. Instead the pause occurs approximately 5-seconds after I initiate "RUN" and the entire thing is rendered without pause between GIFs
Any, hints, ideas, or direction would be greatly appreciated.
[** Using Dr.Python]
regards,
sharky_machine
I am trying to use the Python Sleep Function via import time; I get results but not the results I am looking for.
What I am trying to do is rather simple and only for visual effect in a Python GUI: Display GIF --> Sleep (pause) 5-seconds --> Display next GUI --> Repeat. Such as:
. . . image3 = "pic1.GIF" photo3 = PhotoImage(file=image3) time.sleep(5) image4 = "pic2.GIF" photo4 = PhotoImage(file=image4) . . .
What seems to happen is that I do note a pause, in this case roughly 5-seconds, but it happens before the GUI appears at all upon the screen; the canvas should display, then 1-by-1 each GIF should appear 5-seconds apart. Instead the pause occurs approximately 5-seconds after I initiate "RUN" and the entire thing is rendered without pause between GIFs
Any, hints, ideas, or direction would be greatly appreciated.
[** Using Dr.Python]
regards,
sharky_machine
![]() |
Similar Threads
- Starting Python (Python)
- calling Python function from C/C++ (Python)
- What is sleep function (Perl)
- Interrupt Sleep function (Python)
Other Threads in the Python Forum
- Previous Thread: Python Error-- cannot find file
- Next Thread: Something similar to def in Tkinter
| Thread Tools | Search this Thread |
alarm assignment avogadro beginner bluetooth character cmd code customdialog cx-freeze data decimals dictionary directory dynamic error examples exe file float font format function generator gnu graphics gui halp homework http ideas import input itunes java leftmouse line linux list lists logging loop maintain maze millimeter module mouse number numbers output parsing path port prime programming projects push py2exe pygame pyglet pyqt python queue random recursion schedule screensaverloopinactive script scrolledtext slicenotation sqlite ssh stdout string strings sudokusolver table terminal text thread threading time tkinter tlapse tuple tutorial ubuntu unicode urllib urllib2 variable ventrilo verify vigenere web webservice wikipedia windows wxpython xlib






