Import Error ('mutual inclusion of modules'?)

2005-08-23 Thread icoba
I have the following code: A.py from B import B class R: def __str__(self): return "hello world" b = B() print b B.py from A import R class B: def __init__(self): self.r = R() def __str__(self): return self

Re: Import Error ('mutual inclusion of modules'?)

2005-08-23 Thread icoba
Thanks, I had not found anything about it. But I had not search correctly. There is an entry in the FAQ about it: http://www.python.org/doc/faq/programming.html#how-can-i-have-modules-that-mutually-import-each-other I like the most the third way. I have also tried to move the import to the __init

Encoding detection in the html parser from libxml2

2006-02-07 Thread icoba
Hi, I am parsing html documents using the html parser from libxml2, and if the encoding is included in the document it works perfectly but if it is not, I think it does not work well (probably because I am doing something wrong). As it is said in http://xmlsoft.org/encoding.html the parser should