so i have gone from a linux working environment to windows during the pandemic working from home.
I am using what was the family computer so cant really change to linux on it.
I am trying to combine two files into a third file on linux i can do this using the following
cat file1 file2 > file3
in python i can do this using subprocess this worked fine at my office
on windows i was told it can be done using type with the following command
type file1 file2 > file3
if i run this manually via cmd it works fine and results in a 7mb file but if i try and run the command using subprocess in python the result is a 165byte file
if i print the stdout i simply get the following
b''
the function i am using to run the sub process is as follows
def RUN_SUBPROCESS(COMMAND, LOG):
print('#### STARTING SUB PROCESS')
SUB_PROCESS = subprocess.Popen(COMMAND, shell=True, stdout=subprocess.PIPE)
out, err = SUB_PROCESS.communicate()
SUB_PROCESS.wait()
if LOG == 'true':
print('#### OUTPUT')
print(out)
print('#### ERROR')
print(err)
print('#### SUB PROCESS COMPLETE')
return