I'm writing a python script that needs to call a bash script.
The python script contains variables a1
and a2
that need to be passed as arguments to the bash script.
I've imported subprocess
and am running it like this:
subprocess.check_call( ["./test.sh", a1, a2], shell=False)
but I am getting an error from this line that
OSError: [WinError 193] %1 is not a valid Win32 application. What should I be doing differently?
#!
line, Windows does not. Yourtest.sh
will not have the correct magic number or file association for a Windows executable. – cdarke Sep 20 '18 at 10:25