Thread: [Boa Constr] About Boa constructor 0.6.1
Status: Beta
Brought to you by:
riaan
From: Serge G. <gau...@wa...> - 2007-10-16 15:34:13
|
Hi, I am french user of BC 0.4.4 with wxPython 2.6 and Python 2.5. It works very well ! I tryed to install BC 0.6.1 with wxPython 2.8 and Python 2.5. It is not pos= sible to browse the files to rename several times. There is a encoding prob= lem in FileDlg.pyc file. I found this file only in Python25\\boa-constructor-0.4.4\ directory dated = on 05/03/18. Is it the good file =3F It seems not. Best regards Serge -- J'utilise la version gratu=EDte de SPAMfighter pour utilisateurs priv=E9s. Ce programme a supprim=E93283 d'e-mails spam =E0 ce jour. Les utilisateurs qui paient n'ont pas ce message dans leurse-mails. Obtenez la version gratuite de SPAMfighter ici: http://www.spamfighter.com/= lfr |
From: Werner F. B. <wer...@fr...> - 2007-10-17 08:49:23
|
Serge, Serge Gauthier wrote: > Hi, > > I am french user of BC 0.4.4 with wxPython 2.6 and Python 2.5. > > It works very well ! > > I tryed to install BC 0.6.1 with wxPython 2.8 and Python 2.5. It is not > possible to browse the files to rename several times. There is a > encoding problem in FileDlg.pyc file. > > I found this file only in Python25\\boa-constructor-0.4.4\ directory > dated on 05/03/18. Is it the good file ? It seems not. The file "FileDlg.pyc" and it's source version "FileDlg.py" should be both the Boa versions. Are you using Unicode version of wxPython 2.8? If yes, I had to create a "sitecustomize.py" file in the Python25 folder with the following content: import sys sys.setdefaultencoding('utf-8') Hope this helps Werner |
From: Werner F. B. <wer...@fr...> - 2007-10-17 10:14:55
|
Hi Serge, Serge Gauthier wrote: > Hi Werner, > > I created a sitecustomize.py file in Python25 directory as you wrote > it. It doesn't change anything. > > I found the solution by typing in the shell editor: > > import sys > sys.setdefaultencoding('latin') not 'utf-8' What version of wxPython are you using? For me utf-8 works for both: wx.version() '2.8.4.2 (msw-ansi)' wx.version() '2.8.6.0 (msw-unicode)' > > and everything is ok !! > > Now, how to do it automatically when Boa runs ??? That is what sitecustomize.py does, maybe change it to use 'latin' instead of 'utf-8'. Werner |
From: Werner F. B. <wer...@fr...> - 2007-10-17 13:18:26
|
Hi Serge, Werner F. Bruhin wrote: > Hi Serge, > > Serge Gauthier wrote: >> Hi Werner, >> >> I created a sitecustomize.py file in Python25 directory as you wrote >> it. It doesn't change anything. >> >> I found the solution by typing in the shell editor: >> >> import sys >> sys.setdefaultencoding('latin') not 'utf-8' Did you install Boa using the .exe installer? Werner |
From: Werner F. B. <wer...@fr...> - 2007-10-17 14:49:30
|
Hi Serge, Serge Gauthier wrote: > Hi Werner, > > Yes, I am using the Boa installed with .exe file and wxPython 2.8.6.0 > unicode. That is why sitecustomize.py does NOT work. If you use the .exe installer it installs "its own" Python and wxPython version. You might want to get source package or just checkout the latest from CVS. > > in sitecustomize.py I wrote: > > import sys > sys.setdefaultencoding('latin') > > Nothing changes, by default this is 'ascii'. > > How to change that at startup ? I don't know if this can be done using the .exe installer, maybe Riaan knows of a way. Werner |
From: Riaan B. <riaan@e.co.za> - 2007-10-18 12:44:00
|
Hi, Werner F. Bruhin wrote: >>import sys >>sys.setdefaultencoding('latin') >> >>Nothing changes, by default this is 'ascii'. >> >>How to change that at startup ? > > I don't know if this can be done using the .exe installer, maybe Riaan > knows of a way. Yes, you can set the default encoding for Boa (in the exe and source version) with the command-line parameter -U. e.g. Boa.py -U utf-8 Note that the exe version was built with the ansi version of wxPython so this won't help that much. The next exe version will be built with the unicode version. Cheers, Riaan. |
From: Werner F. B. <wer...@fr...> - 2007-10-18 14:45:43
|
Hi Riaan, Riaan Booysen wrote: > Hi, > > Werner F. Bruhin wrote: >>> import sys >>> sys.setdefaultencoding('latin') >>> >>> Nothing changes, by default this is 'ascii'. >>> >>> How to change that at startup ? >> I don't know if this can be done using the .exe installer, maybe Riaan >> knows of a way. > > Yes, you can set the default encoding for Boa (in the exe and source > version) with the command-line parameter -U. > e.g. Boa.py -U utf-8 That doesn't look like it works for me, e.g.: C:\Python25\Lib\site-packages\boa\Boa.pyw -O .boa-constructor-mine -U iso8859-1 import wx >>> wx.GetDefaultPyEncoding() 'utf-8' 'utf-8' is what is defined in my sitecustomize.py and if I remove it and the .pyc and .pyo I get: import wx >>> wx.GetDefaultPyEncoding() 'cp1252' Werner |
From: Werner F. B. <wer...@fr...> - 2007-10-17 16:40:18
|
Hi, In the future can you please copy the newsgroup or just send it to the newsgroup. Serge Gauthier wrote: > Hi, > > yes, you are rigth with the Boa cource, it is ok !! > > great Very good! > > Is it possible to ask you some help in using sizer in Boa ?? Yes, no problem. Did you work through the tutorial, while it is small and does not show everything about sizers it is a good start (I have to say it, I guess ;-) ). > It seems not to be simple. I did Boa crash with them when I wanted add > Items in. Sizers took me a long time to learn them, and frankly I still have cases where I have problems with them. Generally when working with the UI designer and particularly when working with sizers you should post/save the code pretty often. If you have specific questions/problems it would be best to create a small sample, then attach it to the email and post it to the newsgroup. If I can't help I am sure others will jump in and try to help. Werner |
From: Riaan B. <riaan@e.co.za> - 2007-10-18 15:18:39
|
Hi Werner, Werner F. Bruhin wrote: >>e.g. Boa.py -U utf-8 > > That doesn't look like it works for me, e.g.: > > C:\Python25\Lib\site-packages\boa\Boa.pyw -O .boa-constructor-mine -U > iso8859-1 > > import wx > >>> wx.GetDefaultPyEncoding() > 'utf-8' > > 'utf-8' is what is defined in my sitecustomize.py and if I remove it and > the .pyc and .pyo I get: > > import wx > >>> wx.GetDefaultPyEncoding() > 'cp1252' I'm not sure what will happen if you mix sitecustomize with the -U parameter, as far as I understand it, -U should override sitecustomize, but from your example it looks like it doesn't. I guess don't mix them. BTW, is sys.getdefaultencoding() the same as wx.GetDefaultPyEncoding()? I'd guess sys.setdefaultencoding() must just be called before wx is imported. This is what I get: Boa.py -U utf-8 >>> import sys >>> sys.getdefaultencoding() 'utf-8' >>> import wx >>> wx.GetDefaultPyEncoding() 'utf-8' Boa.exe -U utf-8 >>> import sys >>> sys.getdefaultencoding() 'utf-8' >>> import wx >>> wx.GetDefaultPyEncoding() 'utf-8' Cheers, Riaan. |
From: Werner F. B. <wer...@fr...> - 2007-10-18 18:13:39
|
Hi Riaan, Riaan Booysen wrote: > ... > Boa.exe -U utf-8 Are you doing this on Windows? Could it be that my -O option is having some influence on this? > > >>> import sys > >>> sys.getdefaultencoding() > 'utf-8' > >>> import wx > >>> wx.GetDefaultPyEncoding() > 'utf-8' If I use sitecustomize.py it works for me: import sys >>> sys.getdefaultencoding() 'utf-8' >>> import wx >>> wx.GetDefaultPyEncoding() 'utf-8' If I don't use it the default (cpsomething which is equivalent to iso8859-1) is getting picked up from somewhere, I don't know where from. I believe the wx.etc functions pick it up from python based on some rules Robin at some point explained, but I can't find the thread at the moment. I started testing my things with wxPython Unicode and my plan is to move over to it in the near future and with Python 3000 I understand that UTF-8 will the default. For me the big work will be to change all the database stuff, I believe that version 2.1 of Firebird SQL will help me on this, will start on this as soon as I am back from a cooking week with friends in the south east of France (no Internet access for all that time). Werner |
From: <ia...@gm...> - 2007-10-19 03:38:46
|
SSBtaWdodCBoYXZlIHNlbnQgdGhpcyBtZXNzYWdlIGFscmVhZHksIGJ1dCBpdCB2YW5pc2hlZCAo bm90IGluCm91dGJveCkgd2hlbiBJIGhpdCAic2VuZCIuLi4gd2VpcmQuCgp3aW5YUCBob21lLCB3 eHB5IDIuOCB1bmljb2RlLCBib2EgZnJvbSBDVlMuCgpJIHdhcyBoYXZpbmcgYSBwcm9ibGVtIHdp dGggYWNjZW50cyBpbiB0aGUgcGF0aC4gTXkgaG9tZSBmb2xkZXIgaXMgOgoiQzpcRG9jdW1lbnRz IGFuZFNldHRpbmdzXGlhbmFyw6kiCgpPcGVuaW5nIGJvYSBvbiBmaXJzdCBydW4gZ2F2ZSBtZSB0 aGlzIDoKCiAgRmlsZSAiQm9hLnB5IiwgbGluZSA3MTEsIGluIDxtb2R1bGU+CiAgICBtYWluKCkK ICBGaWxlICJCb2EucHkiLCBsaW5lIDY5MywgaW4gbWFpbgogICAgYXBwID0gQm9hQXBwKCkKICBG aWxlICJCb2EucHkiLCBsaW5lIDQ5NywgaW4gX19pbml0X18KICAgIHd4LkFw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S0tLS0tLS0tLS0tLS0tLS0tLS0tCj4gVGhpcyBTRi5uZXQgZW1haWwgaXMgc3BvbnNvcmVkIGJ5 OiBTcGx1bmsgSW5jLgo+IFN0aWxsIGdyZXBwaW5nIHRocm91Z2ggbG9nIGZpbGVzIHRvIGZpbmQg cHJvYmxlbXM/ICBTdG9wLgo+IE5vdyBTZWFyY2ggbG9nIGV2ZW50cyBhbmQgY29uZmlndXJhdGlv biBmaWxlcyB1c2luZyBBSkFYIGFuZCBhIGJyb3dzZXIuCj4gRG93bmxvYWQgeW91ciBGUkVFIGNv cHkgb2YgU3BsdW5rIG5vdyA+PiBodHRwOi8vZ2V0LnNwbHVuay5jb20vCj4gX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KPiBCb2EtY29uc3RydWN0b3ItdXNl cnMgbWFpbGluZyBsaXN0Cj4gQm9hLWNvbnN0cnVjdG9yLXVzZXJzQGxpc3RzLnNvdXJjZWZvcmdl Lm5ldAo+IGh0dHBzOi8vbGlzdHMuc291cmNlZm9yZ2UubmV0L2xpc3RzL2xpc3RpbmZvL2JvYS1j b25zdHJ1Y3Rvci11c2Vycwo+CgoKLS0gCi0gaWFuYXLDqSBzw6l2aQo= |
From: Werner F. B. <wer...@fr...> - 2007-10-19 07:17:41
|
Hi Ianaré, ianaré sévi wrote: > I had to do some stuff in windows and am getting an ecoding problem. > We've had a lot of those of late, and I wanted to see if anything > could be done. > > WinXP home , wxpython 2.8 unicode, latest boa from CVS. > > My home directory is : "C:\Documents and Settings\ianaré" > (will my accent aigu comme out properly in your e-mails ? ) > Yeap, I can see it fine. > On load, Boa borks with : > > importing Inspector > Traceback (most recent call last): > File "Boa.py", line 711, in <module> > main() > File "Boa.py", line 693, in main > app = BoaApp() > File "Boa.py", line 497, in __init__ > wx.App.__init__(self, False) > File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7823 > , in __init__ > self._BootstrapApp() > File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7420 > , in _BootstrapApp > return _core_.PyApp__BootstrapApp(*args, **kwargs) > File "Boa.py", line 540, in OnInit > inspector = Inspector.InspectorFrame(self.main) > File "C:\Python25\Lib\site-packages\boa-constructor\Inspector.py", > line 157, in __init__ > cmpInf.append(self.paletteImages.Add(IS.load(filename))) > File "C:\Python25\Lib\site-packages\boa-constructor\ImageStore.py", > line 78, in load > imgpath, ext = self.pathExtFromName(rootpath, name) > File "C:\Python25\Lib\site-packages\boa-constructor\ImageStore.py", > line 69, in pathExtFromName > self.checkPath(imgPath) > File "C:\Python25\Lib\site-packages\boa-constructor\ImageStore.py", > line 98, in checkPath > raise InvalidImgPathError, _('%s not valid') %imgPath > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 31: ordinal > not in range(128) > > ----------------------------------------------------- > > > I fixed this by editing "ImageStore.py" like so : > > > def pathExtFromName(self, root, name): > root = root.decode(sys.getfilesystemencoding()) > imgPath = self.canonizePath(os.path.join(root, name)) > ext = os.path.splitext(name)[1] > self.checkPath(imgPath) > return imgPath, ext > > > ".decode(sys.getfilesystemencoding())" is what I use in my > applications to handle this sort of problem. > I have to remember this one for my own stuff, also I always thought that Python/wxPython would handle these cases. What versions are you currently using? Werner |
From: Werner F. B. <wer...@fr...> - 2007-10-19 13:23:03
|
Hi Serge, I would prefer if you just write to the newsgroup, otherwise I get your messages twice and I check the newsgroup at least once a day (except for next week when I am away), and I believe that most of us do who follow a particular list. Serge Gauthier wrote: > Hi, > > Many thanks for your help. > > I solved this problem in using the source version installed in > "\Python25\lib\site-packages" directory with sitecustomize.py file in > Python25 directory. > > I can swap from 0.4.4 version to 0.6.1 by changing the wxPython > version in wx.pth and changing .boa-constructor folder in my Documents > and Settings directory. Both are running correctly. > > About using Sizers directly in Inspector, it seems not to be possible > to set SizerFlags in. Do I need to add these settings in the source > code after init procedure ? Click on the check box next to e.g. Flag, or Style, or Size ...., this will show you all the available entries appropriate to e.g. Flag and you can then set them. Best regards Werner |