[ANNOUNCE] webserve 0.12

Bob Tanner tanner at real-time.com
Fri Nov 3 20:40:44 GMT 2006

Goffredo Baroncelli wrote:

> I released the webserve interface v0.12.
> This version is intended to be compatible with the 0.12.x Bazaar series.

Couple problems.

If you need to do the sys.path thing in webserve-dir.cgi you need to import
sys, like so:

import os
import sys

# sys.path.insert(0, "/path/to/python/lib") # if not a system-wide install
sys.path.insert(0, "bzr.dev") # if not a system-wide install

If not, you get a NameError.

Next, no matter where I unpack the tarball I get an ImportError:

Traceback (most recent call last):
File "/var/www/cgi-bin/webserve-dir.cgi", line 29, in ?
from bzrlib.plugins.webserve import hgweb
No module named webserve
Premature end of script headers: webserve-dir.cgi

Currently have it in my $HOME/plugins directory

$ bzr plugins

Even trying things by hand I get the ImportError:

$ python
Python 2.4.4 (#2, Oct 20 2006, 00:23:25)
[GCC 4.1.2 20061015 (prerelease) (Debian 4.1.1-16.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> from bzrlib.plugins.webserve import hgweb
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named webserve

% python -c "import sys; print sys.path"
['', '/home/tanner/projects/bazaar-ng/bzr.dev', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages/TurboGears-0.8a4-py2.4.egg', '/usr/lib/python2.4/site-packages/TestGears-0.2-py2.4.egg', '/usr/lib/python2.4/site-packages/setuptools-0.6a7-py2.4.egg', '/usr/lib/python2.4/site-packages/FormEncode-0.2.3dev_r1104-py2.4.egg', '/var/lib/python-support/python2.4']

Your example of the webserver-dir.cgi here:


Is very different then the one available via bzr here:


Which are you suppose to use?
Bob Tanner <tanner at real-time.com>          | Phone : (952)943-8700
http://www.real-time.com, Minnesota, Linux | Fax   : (952)943-8500
Key fingerprint = AB15 0BDF BCDE 4369 5B42  1973 7CF1 A709 2CC1 B288

More information about the bazaar mailing list