I want to pass arguments to an rsync
subprocess from a list (or string) but can't find any way to do it without specifying each list item. ie this works
args = ['--progress', '-avh']
subprocess.run(['rsync', args[0],args[1],loaded_prefs['src_dir'],loaded_prefs['dst_dir']])
but this doesn't
args = '--progress -avh'
subprocess.run(['rsync', args,loaded_prefs['src_dir'],loaded_prefs['dst_dir']])
or this
args = ['--progress', '-avh']
subprocess.run(['rsync', ','.join(args),loaded_prefs['dst_dir']])
Any help would be much appreciated