ImportError: No module named bdiff

Alexis S. L. Carvalho alexis at cecm.usp.br
Sun Sep 9 13:33:01 CDT 2007


Thus spake TK Soh:
> I tried to tap into Mercurial 0.9.4's library installed by berkwood's
> win32 installer with the following script but got an error on bdiff:
> 
>     ---------------------
>     import sys
>     sys.path.append(r'c:\mercurial\library.zip')
> 
>     from mercurial import hg
>     -----------------------------
> 
> Here's the error message:
> :
>     D:\>python hglibtry.py
>     Traceback (most recent call last):
>       File "hglibtry.py", line 4, in ?
>         from mercurial import hg
>       File "mercurial\hg.pyc", line 12, in ?
>       File "mercurial\localrepo.pyc", line 11, in ?
>       File "mercurial\changelog.pyc", line 8, in ?
>       File "mercurial\revlog.pyc", line 15, in ?
>       File "mercurial\mdiff.pyc", line 8, in ?
>     ImportError: No module named bdiff
> 
> Is it legal to do so? What went wrong?

IIRC, the standard zipimport module can't import .so/.dll/.pyd files
from .zip archives.  py2exe uses some special importer to be able to
do it.

Alexis


More information about the Mercurial-devel mailing list