title: Python converting UUID's from string
body: <p>I have a text file that includes UUIDS that all look like this:</p>
  
  <pre><code>A4AB4CD2-016B-411E-8BA1-0000C592BF17
  </code></pre>
  
  <p>When I try and parse/print the file with python, most (but not all) end up looking like this:</p>
  
  <pre><code>12:40:54:457
  </code></pre>
  
  <p>There are three chunks per line that I'm parsing, a double, a date, and this uuid.  The first two parts work fine.  The relevant lines of code are:</p>
  
  <pre><code>for line in fileLines:
  
      parts = line.split()
      # Parse first two chunks
      outputFile.write(""" WHERE tableID = '""" + uuid.UUID(parts[2]) + """'""")
  </code></pre>
  
  <p>This fails because the UUIDs are already of the form 12:40:54:547, but I don't know what this sub-type of UUID is called, let alone how to appropriately parse it.  My goal is simply to read in the uuid exactly as it is, and re-print it with some extra text around it so I can run it as an SQL script.</p>
  
  <p>I'm running python 3.3.2</p>
  
  <p>A full line of input looks like this:</p>
  
  <pre><code>339.00  2013-06-18 12:40:54.457 A4AB4CD2-016B-411E-8BA1-0000C592BF17
  </code></pre>