新聞中心

銅鼓ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場(chǎng)景,ssl證書未來市場(chǎng)廣闊!成為創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場(chǎng)價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:028-86922220(備注:SSL證書合作)期待與您的合作!
1、time.sleep(secs)
參考文檔原文:
Suspend execution for the given number of seconds. The argument may be a floating point number to indicate a more precise sleep time. The actual suspension time may be less than that requested because any caught signal will terminate the sleep() following execution of that signal's catching routine. Also, the suspension time may be longer than requested by an arbitrary amount because of the scheduling of other activity in the system.
大意:
讓程序執(zhí)行暫停指定的秒數(shù),參數(shù)可以是浮點(diǎn)型以指定精確的時(shí)間,但是程序真正暫停的時(shí)間可能長(zhǎng)于請(qǐng)求的時(shí)間也可能短于暫停的時(shí)間。
2、raw_input( )
通過等待輸入來讓程序暫停。
3、os.system("pause")
通過執(zhí)行操作系統(tǒng)的命令來讓程序暫停,該函數(shù)是通過實(shí)現(xiàn)標(biāo)準(zhǔn)C函數(shù)system( )來實(shí)現(xiàn)的。
python2.4新加入了subprocess模塊,而且官方建議使用改模塊替換os.system所以,也可以這樣寫:
subprocess.call("pause",shell=True)
眾多python培訓(xùn)視頻,盡在python學(xué)習(xí)網(wǎng),歡迎在線學(xué)習(xí)!
網(wǎng)頁(yè)標(biāo)題:創(chuàng)新互聯(lián)Python教程:怎么停止python腳本
本文網(wǎng)址:http://m.fisionsoft.com.cn/article/dhhjggj.html


咨詢
建站咨詢
