title: reading fortran unformatted file with python
body: <p>I have a fortran program generating unformatted files and I am trying to read them into Python.</p>
  
  <p>I have the source code so I know the first "chunk" is a character array of <code>character*1 name(80)</code> and so on. So I start out with</p>
  
  <pre><code>f = open(filename,'rb')
  bytes = 80
  name = struct.unpack('c'*bytes,f.read(bytes))
  </code></pre>
  
  <p>and <code>name</code> is an 80-length tuple consisting of strings of length 1; some of the contents of which are hexadecimal strings (e.g., <code>\x00</code>). How can I go about converting this variable to a single ascii string?</p>