[英]How to take multiple "user input" stored in a file (e.g., *.inp) in terminal for python script
[英]How do I create a script that will take user input and use it in a terminal command using python 3.6?
我正在嘗試在Linux上的python3.6中編寫一個腳本,該腳本接受用戶的輸入(以URL的形式),然后在提供的輸入上執行“ whois”終端命令。 我正在嘗試從IDLE啟動它。 我最好的是:
import os
os.system("clear")
os.system("gnome-terminal -e 'bash -c \'")
w = ""
w = (input("Who is your target?" ))
os.system("whois " + w)
似乎在輸入之后,gnome終端沒有打開,什么也沒有發生。 目前,我對python的了解還不是很豐富,為此我正苦苦掙扎!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.