Feed on
Posts
Comments

pause python


if you’d to insert a pause into a python script, use the time module and call the “sleep” method. it takes arguments of seconds.

import time

time.sleep(1)

note that if what you’re really trying to do is set breakpoints and debug your script, you should be looking at the python debugger instead.


Bookmark and Share

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

2 Responses to “pause python”

  1. on 07 Sep 2008 at 8:58 am Gus

    Thanks! New to python, great tip.

  2. on 01 Nov 2009 at 12:31 am did it

    didn’t work for me, amidoinitwrong?

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.