Merged Anton Batenev's report of Nicolas Alvarez' unicode-in-be-new bug
[be.git] / .be / bea86499-824e-4e77-b085-2d581fa9ccab / bugs / 31cd490d-a1c2-4ab3-8284-d80395e34dd2 / comments / b2a333f7-eda6-42b9-8940-177f61ca7f48 / body
1 $ python test.py 
2 **********************************************************************
3 File "/home/wking/src/fun/be/libbe/plugin.py", line 31, in libbe.plugin.iter_plugins
4 Failed example:
5     "plugin" in [n for n,m in iter_plugins("libbe")]
6 Exception raised:
7     Traceback (most recent call last):
8       File "/usr/lib/python2.5/doctest.py", line 1228, in __run
9         compileflags, 1) in test.globs
10       File "<doctest libbe.plugin.iter_plugins[1]>", line 1, in <module>
11         "plugin" in [n for n,m in iter_plugins("libbe")]
12       File "/home/wking/src/fun/be/libbe/plugin.py", line 38, in iter_plugins
13         yield modfile[:-3], my_import(prefix+"."+modfile[:-3])
14       File "/home/wking/src/fun/be/libbe/plugin.py", line 21, in my_import
15         module = __import__(mod_name)
16       File "/home/wking/src/fun/be/libbe/restconvert.py", line 27, in <module>
17         from elementtree import ElementTree
18     ImportError: No module named elementtree
19 **********************************************************************
20 1 items had failures:
21    1 of   2 in libbe.plugin.iter_plugins
22 ***Test Failed*** 1 failures.
23 Traceback (most recent call last):
24   File "test.py", line 32, in <module>
25     for module in plugin.iter_plugins("libbe"):
26   File "/home/wking/src/fun/be/libbe/plugin.py", line 38, in iter_plugins
27     yield modfile[:-3], my_import(prefix+"."+modfile[:-3])
28   File "/home/wking/src/fun/be/libbe/plugin.py", line 21, in my_import
29     module = __import__(mod_name)
30   File "/home/wking/src/fun/be/libbe/restconvert.py", line 27, in <module>
31     from elementtree import ElementTree
32 ImportError: No module named elementtree
33
34
35 Looking into ElementTree, I found their webpage:
36 http://effbot.org/zone/element-index.htm
37
38   It’s common practice to import ElementTree under an alias, both to
39   minimize typing, and to make it easier to switch between different
40   implementations:
41
42   $ python
43   >>> import elementtree.ElementTree as ET
44   >>> import cElementTree as ET
45   >>> import lxml.etree as ET
46   >>> import xml.etree.ElementTree as ET # Python 2.5
47
48 Using new import style, fall back to old if that fails.
49 Affected files:
50  libbe/restconvert.py
51  Bugs-Everywhere-Web/beweb/formatting.py