How to execute program or batch file?

Viewed 486

I have installed PyCharm to using Python language on Windows 10.

I'm trying to execute command from Linux command in PyCharm, I used this code:

import subprocess
subprocess.run("cat",shell=True,text=True)

But I get this error:

'cat' is not recognized as an internal or external command, operable program or batch file.

I want to execute several commands another such as this example, but all commands raise the same error. How to solve this?

1 Answers

Cat is a binary included in Unix systems, since windows isn't based on Unix, it wouldn't work. You should rather try the TYPE command in Windows

Related