webexteamssdk/utils.py
def to_bytes(string):
    """Convert a string (bytes, str or unicode) to bytes."""
    assert isinstance(string, basestring)
    if sys.version_info[0] >= 3:
        if isinstance(string, str):
            return string.encode('utf-8')
        else:
            return string
    else:
        if isinstance(string, unicode):
            return string.encode('utf-8')
        else:
            return string
def to_bytes(string):
    """Convert a string (bytes, str or unicode) to bytes."""
    assert isinstance(string, basestring)
    if sys.version_info[0] >= 3:
        if isinstance(string, str):
            return string.encode('utf-8')
        else:
            return string
    else:
        if isinstance(string, unicode):
            return string.encode('utf-8')
        else:
            return string
def to_bytes ( string ) : assert isinstance ( string , basestring ) if sys . version_info [ 0 ] >= 3 : if isinstance ( string , str ) : return string . encode ( 'utf-8' ) else : return string else : if isinstance ( string , unicode ) : return string . encode ( 'utf-8' ) else : return string
Convert a string (bytes, str or unicode) to bytes.
Convert a string ( bytes str or unicode ) to bytes .