簡體   English   中英

有人能告訴我 python 中的回車鍵是什么嗎?

[英]Can someone tell me what the enter key is in python?

firmware = input("which image would you like to upload?")
if firmware == 1:
    net_connect.send_config_set("wr")
    net_connect.send_config_set(" copy tftp://cisco@10.36.50.60/s2t54-ipservicesk9-mz.SPA.152-1.SY6.bin bootdisk:")
    print ("Press enter to confirm ")
    # How can I send a enter command to the shell

抱歉,我已經調整了帖子,但我已經評論了我需要發送回車鍵的地方我已經嘗試過 print("\n") 並且我已經嘗試過 print("")。 兩者都不起作用。 有人可以建議:)

你可以這樣做:
input("Press the enter key to continue.. ")
把它放在你想確認或暫停的地方。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM