title: Using CSV Sniffer to determine a delimiter but doesnt work on multiple files
body: <p>I'm using the Sniffer class in CSV Reader to determine what a delimiter is in a CSV file and it works on single files but if I add in a loop and point it to a folder with the same CSV in, it throws out this error:</p>
  
  <pre><code>File "delimiter.py", line 17, in read_csv_delimit
  reader = csv.reader(csvfile, dialect)
  TypeError: "delimiter" must be a 1-character string
  </code></pre>
  
  <p>The script looks like this:</p>
  
  <pre><code>#!/usr/local/bin/python3
  
  import csv
  import os
  
  def read_csv_delimit(file_dir, csv_file):
      # Initialise list
      file_csv = []
      # Open csv &amp; check delimiter
      with open(file_dir + "/" + csv_file, newline='', encoding = "ISO-8859-1") as csvfile:
          dialect = csv.Sniffer().sniff(csvfile.read(1024))
          csvfile.seek(0)
          reader = csv.reader(csvfile, dialect)
          for item in reader:
              file_csv.append(item[0])
          #del file_csv[0]
          return file_csv
  
  def split_path(full_path):
      #path = path.rstrip(os.sep)
      head, tail = os.path.split(full_path)
      return (head, tail)
  
  
  machine_dir = input("Drop the folder here: ")
  
  # Get list of machine csv
  machines = os.listdir(machine_dir)
  
  for machine in machines:
      print(machine)
      #file_dir, csv_file = split_path(csv_file)
      machine_list = read_csv_delimit(machine_dir, machine)
      print(machine_list)
  </code></pre>