Discuss / 编程 / 评论: 使用新浪微博API:创建SDK

评论: 使用新浪微博API:创建SDK

Topic source

请问,下载sinaweibopy源码,在Eclipse工程中打开有第102行代码有问题出现错误。错误内容:”Undefined variable from import: types_map“,请问是怎么回事?

def _guess_content_type(url):

    n = url.rfind('.')

    if n==(-1):

        return 'application/octet-stream'

    ext = url[n:]

    return mimetypes.types_map.get(ext, 'application/octet-stream')


  • 1

Reply