[Tutor] import'ing problems (path)

Tim Johnson tim at johnsons-web.com
Tue Oct 5 06:13:42 CEST 2004


* Chad Crabtree <flaxeater at yahoo.com> [041004 19:54]:
> Tim Johnson wrote:
> 
> >>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?
> >>
> >>    
> >>
  Hi Chad:

> I think (not sure) that you need to try
> 
> from WebKit import Page
 
  Sorry. That gives me the error message:
   No module named WebKit

  WebKit is a directory
    /home/tim/downloads/python/Webware-0.8.1/WebKit

  Page.py -  
    full path: 
  /home/tim/downloads/python/Webware-0.8.1/WebKit/Page.py
  is a file,

  and contains the Page class. :-) In case you haven't 
  noticed, I don't fully comprehend how python handles
  imports, namespaces and paths.

  thanks!
  tim
-- 
Tim Johnson <tim at johnsons-web.com>
      http://www.alaska-internet-solutions.com


More information about the Tutor mailing list