Python feature suggestion - load (binary) content from file
I've just implemented this in a project: binary_data = open(self.filename(), "rb").read() mimetype, encoding = mimetypes.guess_type(self.filename()) if not mimetype: mimetype = 'application/octet-stream' # Riak's own default self.riak
Re: Python feature suggestion - load (binary) content from file
py to do that for you. > > Thanks, > Eric Moritz. > > On Sun, Apr 10, 2011 at 10:49 AM, Ana Nelson wrote: > > I've just implemented this in a project: > > > > binary_data = open(self.filename(), "rb").read() > > mimetype, encod