import subprocess
subprocess.run(['ls' , '-al'], shell = true)
I'm working on turning other external programs in Python using subprocess.
The external program I want to run is a device simulation program called SMARTSPICE
File name is 'testinverter.in' and
The command to enter on the Linux terminal is 'smartspice -b testinver.in -one newfile'.
I wonder how to write code with Python subprocess.
in my opinion
run subprocess. ([' smart spice - b testinverter3.in - o newfile, '], shell true).
I wrote it in, but there is an error (I wrote it in the first column because I received the command directly)
I ask for your help.
python linux subprocess
subprocess.run(['smartspice', '-b', 'testinverter3.in', '-o', 'newfile'], shell = True)
Would you like to run it like this?
© 2024 OneMinuteCode. All rights reserved.