[Tutor] import'ing problems (path)

Tim Johnson tim at johnsons-web.com
Tue Oct 5 20:29:18 CEST 2004

* Kent Johnson <kent_johnson at skillsoft.com> [041005 05:10]:
> Tim,
  Hi Kent:
> Did you run the WebWare installer or just unpack the distribution file? 

  I ran the Webware installer, it did not appear to copy files
> Usually third-party libraries are installed in Python/lib/site-packages. 

  So... I reinstalled, by unpacking to
  then ran the webware installer again, said installation was
  Now, Page.pyc is at 
  Now, if I code:
  import Webware.WebKit ## and stop the program here, there is no
                        ## ImportError exception thrown
  If I code 
  import Webware.WebKit.Page
  ## I get the ImportError: "No module named MiscUtils"
  MiscUtils is a directory at the same level ast WebKit.

  Not sure where to go from here.......

> This directory is automatically added to sys.path.
> Alternatively you can make a permanent, global modification to sys.path by 
> creating a file
> Python/lib/site-packages/sitecustomize.py
> containing the two lines
> import sys
> sys.path.append('/home/tim/downloads/python/Webware-0.8.1')
Tim Johnson <tim at johnsons-web.com>

More information about the Tutor mailing list