0
在Python中,是否可以運行shell命令,而命令是否以變量形式存儲爲文本? 例如:當cmd是文本變量時運行subprocess.call(cmd)
self.command_editor = QTextEditor()
self.command_editor.append("echo command")
cmd = str(self.command_editor.toPlainText())
call(cmd)
這個代碼不`噸的工作!