I’m trying to create a Python script that launches a C program that is located in the same folder and it must take the input and write out the output in the same folder. I tried to use the “subprocess.run()” method but my problem with it is that it only works if I execute the C file through WSL, but my main necessity is that I want to “zip” the folder and make it usable for other people as this is a small project I need to share with colleagues. Can somebody help?
Tried using Python subprocess.run() method but it obviously won’t work for other people as it works for me just because I have WSL installed
subprocess.run()eventually is the right thing to do – but if you need WSL for then your programme has been compiled for linux – so it cannot run under windows natively. Recompile your programme then using a compiler for windows (e.g. MinGW, MSVC, ...).