title: How can I write a DEAP logbook as text file?
body: <p>I'm working with DEAP for genetic algorithms.
  I got some results in a logbook. 
  Logbook have its shape as appends of dictionary like below.</p>
  
  <pre><code>{"gen": 0, "nevals": 200, "avg": 5678.124656362589, "std": 1665.10303246997, "min": 2414.709605862963, "max": 10544.10349270114, "time": 3.061805009841919}
  {"gen": 1, "nevals": 200, "avg": 4615.100755434814, "std": 1032.0542912118117, "min": 2414.709605862963, "max": 8710.009719746668, "time": 5.24877405166626}
  {"gen": 2, "nevals": 200, "avg": 4426.86753960162, "std": 952.752217081577, "min": 2414.709605862963, "max": 7834.360961929298, "time": 7.716948747634888}
  {"gen": 3, "nevals": 200, "avg": 4312.832205468258, "std": 954.6308089644021, "min": 2820.0828681777357, "max": 8069.475022854921, "time": 10.185122013092041}
  {"gen": 4, "nevals": 200, "avg": 4333.539783185404, "std": 1155.0262921447736, "min": 2761.1404825322666, "max": 9830.868579904474, "time": 12.684537410736084}
  {"gen": 5, "nevals": 200, "avg": 4285.034002752331, "std": 1136.5306484499206, "min": 2571.9258380478823, "max": 10371.549396541837, "time": 15.215197086334229}
  </code></pre>
  
  <p>I can write this as a text file with <code>json.dumps</code> method. But I wanna write this as a text file like below, as same as results on console.</p>
  
  <p><a href="https://i.stack.imgur.com/tKGN8.png" rel="nofollow noreferrer">result on python console</a></p>
  
  <p>Could I handle this?</p>
  
  <p>I use python 3.6 now.</p>