Jennifer Davis (sigje) wrote,
Jennifer Davis
sigje

Checking out Head First Programming

I'll write a complete review at some point, but just wanted to make a comment about the urllib.request exercise it has in Chapter 3.

If you are like me and starting to learn python, you may have downloaded the recommended 2.6.4 release and started mucking about with it. I first downloaded python when it was the 2.6.3 release so this may no longer be applicable, but it wasn't available within the first few lines when I did a search for the error:


Traceback (most recent call last):
File "test.py", line 1, in
import urllib.request
ImportError: No module named request

As the book Head First programming mentions in the intro, they are basing their code on 3.0 line of code. Download the latest release (3.1.1 at this time) and you will have no problem.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment