Correct Way To Find things in Pydev Anacondas py33

184 Views Asked by At

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?

1

There are 1 best solutions below

0
On

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