title: Is there a Python module to "thaw" data frozen using Perl's Storable?
body: <p>I have a legacy database which contains simple data structures (no CODE refs thank goodness) that have been written using the <code>nfreeze</code> method of the <a href="http://search.cpan.org/~ams/Storable/Storable.pm" rel="noreferrer"><code>Storable</code></a> module in Perl.</p>
  
  <p>Now I have a need to load this data into a Python application. Does anyone know of a Python implementation of <code>Storable</code>'s <code>thaw</code>? Google hasn't helped me.</p>
  
  <p>If it comes to it, I can reverse engineer the data format from the <a href="http://search.cpan.org/~ams/Storable/Storable.pm" rel="noreferrer">Storable</a> source, but I'd prefer to avoid that fun if it's been done already.</p>
  
  <p>To express in code: Given a Perl program like this:</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  
  use MIME::Base64;
  use Storable qw/nfreeze/;
  
  my $data = {
      'string' =&gt; 'something',
      'arrayref' =&gt; [1, 2, 'three'],
      'hashref' =&gt; {
          'a' =&gt; 'b',
      },
  };
  
  print encode_base64( nfreeze($data) );
  </code></pre>
  
  <p>I'm after a <code>magic_function</code> such that this Python:</p>
  
  <pre><code>#!/usr/bin/env python
  import base64
  import pprint
  import sys
  
  def magic_function(frozen):
      # A miracle happens
      return thawed
  
  if __name__ == '__main__':
      frozen = base64.b64decode(sys.stdin.read())
      data = magic_function(frozen)
      pprint.pprint(data)
  </code></pre>
  
  <p>prints:</p>
  
  <pre><code>{'string': 'something', 'arrayref': [1, 2, 'three'], 'hashref': {'a': 'b'}}
  </code></pre>
  
  <p>when run against the output of the Perl program.</p>