0

I am using PyDev to develop some Python software.

My environment is Anacondas, Python 3.3

Just now, I wanted to use the cookiejar module.

The online tutorials state that I need to import the module using

import cookiejar

However, that did not work. After searching through my files, I discovered that I needed to use:

import http.cookiejar

I am pretty sure that I am not supposed to have to search through my file system in order to find a module. What is the correct way to do this?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Ginger
  • 8,320
  • 12
  • 56
  • 99

1 Answers1

0

My environment was set incorrectly, and I was actually using Python 2.7 instead of Python 3.2.

Some of the classes for Python 3.3 have been placed into packages, which is why I need http.cookiejar instead of cookiejar. To find these, I need to look up documentation specific to 3.3, rather than 2.7. e.g. http://docs.python.org/3.3/library/http.cookiejar.html

Ginger
  • 8,320
  • 12
  • 56
  • 99