Passing a list to a subprocess call
问题 I have a problem with trying to pass a list into a subprocess call command. I am trying to call the windows robocopy function, passing a list of file types that it should filter by. filter_list = ['*.txt', '*.dat'] call(["robocopy", src, dst, filter_list, "/e"]) So passing the list itself does not work the output from robocopy showed that it was trying to find the file type " .txt .dat" as if the whole list were a single file type. I then tried the following call(["robocopy", src, dst, ','