I know that it is bad practice to use shell=True for subprocesses. However for this line of code, I'm not sure how to execute it with shell=False
subprocess.Popen('candump -tA can0 can1 >> %s' %(file_name), shell=True)
Where the command I want to run is:
candump -tA can0 can1 >> file_name
Where file_name
is /path/to/file.log