python-duckduckgo icon indicating copy to clipboard operation
python-duckduckgo copied to clipboard

Update the package to Python 3

Open HGStyle opened this issue 2 years ago • 0 comments

You literaly just need to replace only one line ! This line:

import urllib2

Need to be replaced by this line:

import urllib.request as urllib2

If you want that Python2 and Python3 are supported, replace the import urllib2 line by:

import sys
if int(sys.version_info[0]) > 2:
    import urllib.request as urllib2
else:
    import urllib2

Please, change this in the code, then republish the package on PyPI. Thanks !

HGStyle avatar Jan 18 '23 12:01 HGStyle