title: How to implement OpenSSL functionality in Python?
body: <p>I would like to encrypt a secret text by public-key and decrypt it by private-key in Python.
  I can achieve that with the <code>openssl</code> command:</p>
  
  <pre class="lang-sh prettyprint-override"><code>echo "secrettext/2011/09/14 22:57:23" | openssl rsautl -encrypt -pubin -inkey public.pem | base64  data.cry
  base64 -D data.cry | openssl rsautl -decrypt -inkey private.pem
  </code></pre>
  
  <p>How would one implement that in Python?</p>