title: passing string argument to mysql
body: <p>I'm trying to parse a value from argument using argparse. Which works fine when I test my conditionals with "print". The error happens when I now add the values to my sql code. Pardon my not so pretty sql query, it's the only way I could get the data that I need.   </p>
  
  <p><strong>Error message:</strong> TypeError: must be string or read-only buffer, not tuple</p>
  
  <pre><code>import mysqldb
  import argparse
  parser = argparse.ArgumentParser()
  parser.add_argument('-m','--machine', nargs=1, help="Machine Hostname", action="store")
  args = parser.parse_args()
  
  query = (""" select ifname, usname, mtdesc, lobuilding Location from 
  interface left join machine on ifmcid=mcid
  left join machine_type on mcmtid=mtid left join user on mcusid=usid left join location on mcloid=loid
  WHERE mccurrentosid = 32 AND ifname = %s """, (args.machine,))
  cur.execute(query )
  for row in cur.fetchall():
  print row
  </code></pre>