Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Turn a (byte) string or a unicode string into a (byte) string.

            def _as_bytes(s):
        """Turn a (byte) string or a unicode string into a (byte) string."""
        return str(s)
        


src/b/i/Bio_Eutils-1.63/Bio_Eutils/Entrez/__init__.py   Bio_Eutils(Download)
from Bio_Eutils._py3k import HTTPError as _HTTPError
 
from Bio_Eutils._py3k import _binary_to_string_handle, _as_bytes
 
email = None
        if post:
            #HTTP POST
            handle = _urlopen(cgi, data=_as_bytes(options))
        else:
            #HTTP GET