[英]Python code won't pause
我正在看Zed Shaw的“艱苦學習Python”,我正在練習13,我無法讓python暫停,所以我可以看到代碼的作用。
from sys import argv
script, first, second, third = argv
print "The script is called:", script
print "Your first variable is:", first
print "Your second variable is:", second
print "Your third variable is:", third
raw_input(' Press enter')
您的腳本沒有問題。 您需要使用恰好3個參數調用腳本。 否則會拋出錯誤。
使用參數運行應用程序:
python <yourpath>\\script.py arg1 arg2 arg3
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.