In python 3 urllib2 was merged into urllib. See also another Stack Overflow question and the urllib PEP 3108.
To make Python 2 code work in Python 3:
try:
import urllib.request as urllib2
except ImportError:
import urllib2
More Related Contents:
- python3 print unicode to windows xp console encode cp437
- Decode PowerShell output possibly containing non-ASCII Unicode characters into a Python string
- What is needed for curses in Python 3.4 on Windows7?
- Print LF with Python 3 to Windows stdout
- How can I play a sound when a tkinter button is pushed?
- build a .exe for Windows from a python 3 script importing theano with pyinstaller
- Python multiprocessing stdin input
- Remove credentials from Git
- Get encoding of a file in Windows
- Nodejs cannot find installed module on Windows
- How to install Kafka on Windows?
- Is there anything like inotify on Windows?
- How to enumerate process’ handles?
- Calculate time difference in Windows batch file
- Best lightweight web server (only static content) for Windows [closed]
- Which Font is the default for MFC Dialog Controls?
- How do I find which program is using port 80 in Windows? [duplicate]
- How to use OpenSSL with Visual Studio [closed]
- “Firebase cannot be loading because running scripts is disabled on this system”, VSCode on Windows
- How to list all folder with size via batch file
- Open Internet Explorer from Chrome using a protocol handler (ie:url)
- Concatenate text files with Windows command line, dropping leading lines
- batch file to check 64bit or 32bit OS
- Finding parent process ID on Windows
- How to create a robust, minimal installer for Windows? [closed]
- What are SO_SNDBUF and SO_RCVBUF
- How can I call a exported function using ordinal number
- Is x86 32-bit assembly code valid x86 64-bit assembly code?
- Classic ASP : C0000005 Error on execution
- SWT No More Handles