З вашим PowerShell з'єднати лінію Open, ввести python до керування Python 3 interpreter. (Деякі інструкції prefered to use the command py or python3 , these should also work).
Тут є повний файл. import subprocess def run(self, cmd): completed = subprocess. run(["powershell", "-Command", cmd], capture_output=True) return completed if __name__ == '__main__': hello_command = "Write-Host 'Hello Wolrd!'" hello_info = run(hello_command) if hello_info.
How do I switch from PowerShell to Python?
- Do win + R комбінація.
- Тип cmd і enter.
- Тип python в terminal.