I am using subprocess.Popen module from python 3.7 on windows 10 OS. Using this function I am trying to open the .hex file which is specified in the particular path. I have specified the path in this way...
iemHexPath = "C:\Haxiot_win_version\iem\hxc-iem-v00_23.hex"
This is the way I have mentioned in the python path. Now using subprocess.Popen I have done in this way,
p1 = subprocess.Popen(['st-flash', '--serial', mcuSTLinkSerial, '--format','ihex', 'write', iemHexPath], stderr=subprocess.PIPE, stdout=subprocess.PIPE)
Even though I have that file in that specified path I'm getting the above mentioned File not found error. I have that particular code running successfully running on Raspberry pi environment. Now I'm porting the same code to windows, Could anyone suggest me any changes that would be great help.
NOTE: In the raspberry pi environment I had python 2.7 version upon running, now in windows it is 3.7 version. Does the change in the python version impact the this line of code. If so changes welcomed for python 3.7.
Thank you