[Python-porting] Questions for porting unicode with backward compatibility

Chitrank Dixit chitrankdixit at gmail.com
Wed May 22 00:38:48 CEST 2013


Okay module six is made good but it lacks in some cases

I am referring this documentation of six module
http://pythonhosted.org/six/

and getting problem in this line *from six.moves import html_entities,
html_parser*
I have installed six module in both python 2 and python 3.3 but I am
getting problem in python 3.3 it says

Traceback (most recent call last):
  File "html.py", line 34, in <module>
    from six.moves import html_entities, html_parser
  File "/usr/local/lib/python3.3/dist-packages/six.py", line 84, in __get__
    result = self._resolve()
  File "/usr/local/lib/python3.3/dist-packages/six.py", line 103, in
_resolve
    return _import_module(self.mod)
  File "/usr/local/lib/python3.3/dist-packages/six.py", line 74, in
_import_module
    __import__(name)
  File
"/home/chitrank/Documents/Google_Summer_of_code/moinmoin_pre/Emeraldtree/EmeraldTree/emeraldtree/html.py",
line 34, in <module>
    from six.moves import html_entities, html_parser
  File "/usr/local/lib/python3.3/dist-packages/six.py", line 84, in __get__
    result = self._resolve()
  File "/usr/local/lib/python3.3/dist-packages/six.py", line 103, in
_resolve
    return _import_module(self.mod)
  File "/usr/local/lib/python3.3/dist-packages/six.py", line 74, in
_import_module
    __import__(name)
ImportError: No module named 'html.entities'; html is not a package

What could be the error please let me know


*Regards
*
*Chitrank Dixit
*
*IIPS-DAVV
*
*Indore (M.P.) , India *
*MCA
*
*trackleech.blogspot.in*


On Tue, May 21, 2013 at 2:16 PM, Lennart Regebro <regebro at gmail.com> wrote:

> On Tue, May 21, 2013 at 10:32 AM, Chitrank Dixit
> <chitrankdixit at gmail.com> wrote:
> > Hello Python Developers
> >
> > I need to ask you some questions please answer me some questions
> >
> > 1) alternative to unichr() in python 3.3 (is it chr() or anything else is
> > available).
>
> chr()
>
> > 2) does using six module rather than doing some try catch stuff is a
> better
> > option.
>
> Depends on what, and how much of six you end up using.
>
> > 3) does next() method behavior is same in both python 2.7 and python 3.3.
>
> As far as I know, yes.
>
> //Lennart
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-porting/attachments/20130522/bb9c7338/attachment.html>


More information about the Python-porting mailing list