【发布时间】:2013-06-21 10:43:53
【问题描述】:
谁能帮我在不使用 2to3 工具的情况下将这个 python 2 代码翻译成 python 3 吗?
import urllib2, cookielib
self.cj = cookielib.MozillaCookieJar(self.cookie_file)
self.opener = urllib2.build_opener(
urllib2.HTTPRedirectHandler(),
urllib2.HTTPHandler(debuglevel=0),
urllib2.HTTPSHandler(debuglevel=0),
urllib2.HTTPCookieProcessor(self.cj)
)
【问题讨论】:
标签: python-2.7 python-3.x urllib2 cookielib python-2to3