Python-RSA uses the PEM RSAPublicKey format and the PEM RSAPublicKey format uses the header and footer lines: openssl NOTES
-----BEGIN RSA PUBLIC KEY-----
-----END RSA PUBLIC KEY-----
Output the public part of a private key in RSAPublicKey format: openssl EXAMPLES
openssl rsa -in key.pem -RSAPublicKey_out -out pubkey.pem