On Wed, Nov 18, 2009 at 9:57 PM, werner <[email protected]> wrote: > > Hi Limodou, > > limodou wrote: >> >> I can't install pyenchart 1.5.3 correctly in python 2.5 and 2.6, it'll >> complain that can't locate the entry of g_hash_table_get_keys in >> libglib-2.0-0.dll, so if you have the same problem? >> > > No not the same, on 2.5.4 I get this: > import enchant > File "<console>", line 1, in <module> > File "C:\Python25\lib\site-packages\enchant\__init__.py", line 794, in > <module> > _broker = Broker() > File "C:\Python25\lib\site-packages\enchant\__init__.py", line 202, in > __init__ > self._this = _e.broker_init() > ''' <type 'exceptions.AttributeError'> : 'module' object has no attribute > 'broker_init' ''' > > Note that I am on Win7 and used the .exe installer. > > On Py2.6.3 it works fine for me.
Oh, I'll try 2.6.4. >> >> And I also have some question about your code before I can't test your: >> >> 1. Why you didn't use line by line but full text, the reason that I >> use line by line because: >> >> a. the file may be large, so line by line will be faster >> b. user may change the content of the current document, so line by >> line will start from the current cursor position, not always from >> beginning >> > > Totally agree that line by line would be better. > > But could not figure out how to fix the problem that the text to be > corrected was not correctly marked, i.e. as shown on the picture I sent the > other day the marked position is off by at least one character. > > Something to do with Unicode/utf8 (in my case just things like "ü" etc) > which seem to cause the problem. > > The StyledTextCtrl is way over my head to try and figure this problem out. > If I can import enchant correctly, I'll fix the problem. But maybe you can send me a test file, thanks. >> c. after user modified the document or replace the found word, the >> text between self.chkr and dosument may not the same, so if you nocie >> this problem >> > > On found word it is fine as the document gets re-written, but you are right > if user changes the document then there is a problem. >> >> 2. Why you use multitext to show the suspend word? Because when found >> a suspend word, ulipad will highlight the word in the document >> >> > > Same problem as mentioned above. If 1. gets fixed then one could remove the > multitext control. > Ok, thanks. -- I like python! UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/ UliWeb <<simple web framework>>: http://uliwebproject.appspot.com My Blog: http://hi.baidu.com/limodou
