To go from: several ways to let Python scripts suspend execution
1.time.sleep (secs)
Reference Document Original:
Suspend execution for the given number of seconds. The argument may is a floating point number to indicate a more precise sleep time. The actual suspension time may is less than that requested because any caught signal'll terminate the sleep () following Execution of that signal ' s catching routine. Also, the suspension time could longer than requested by a arbitrary amount because of the scheduling of In the system.
Effect:
Allows the program to suspend the specified number of seconds, the parameter can be a floating-point type to specify the exact time, but the actual pause time may be longer than the requested time or shorter than the paused time.
2. Raw_input ()
To suspend a program by waiting for input
3. Os.system ("pause")
The program is paused by executing the operating system's commands, which are implemented by implementing the standard C function system ().
Python2.4 has added a new subprocess module, and it is officially recommended that you replace Os.system with a replacement module, so you can write:
Subprocess.call ("Pause", shell=true)