[Tutor] import'ing problems (path)

Kent Johnson kent_johnson at skillsoft.com
Tue Oct 5 15:04:23 CEST 2004


Did you run the WebWare installer or just unpack the distribution file? 
Usually third-party libraries are installed in Python/lib/site-packages. 
This directory is automatically added to sys.path.

Alternatively you can make a permanent, global modification to sys.path by 
creating a file
containing the two lines
import sys


At 03:17 PM 10/4/2004 -0800, Tim Johnson wrote:
>Hello Pythonists:
>     I have installed a python package called webware
>at the following path:
>I have the following python code:
>print sys.path   ## shows '/home/tim/downloads/python/Webware-0.8.1'.
>                  ##   as a member of sys.path
>I need class Path which resides in
>to import it, I use the following statement:
>from WebKit.Page import Page
>and I get the following error message:
>"No module named WebKit.Page"
>What am I doing wrong and what needs to be done t
>correct it?
>Tim Johnson <tim at johnsons-web.com>
>       http://www.alaska-internet-solutions.com
>Tutor maillist  -  Tutor at python.org

More information about the Tutor mailing list