How should I base64 encode a PDF file for transport over XML-RPC in Python?
相关问题
- Views base64 encoded blob in HTML with PHP
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
If you don't want to use the xmlrpclib's Binary class, you can just use the .encode() method of strings:
Actually, after some more digging, it looks like the
xmlrpclib
module may have the piece I need with it'sBinary
helper class:Here's an example from the Trac XML-RPC documentation
You can do it with the base64 library, legacy interface.
Looks like you might be able to use the binascii module