Chinaunix首页 | 论坛 | 博客
  • 博客访问: 231170
  • 博文数量: 59
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 493
  • 用 户 组: 普通用户
  • 注册时间: 2014-04-26 17:46
个人简介

做技术要:鹰击长空,鱼翔浅底。

文章分类

全部博文(59)

文章存档

2017年(1)

2016年(3)

2015年(27)

2014年(28)

分类: Python/Ruby

2014-12-18 13:59:20

I had the same problem. I can't tell you why. I can just tell you how I fixed it.
After you download and unzip the boa files go into the boa folder (On a Mac this could be: /Users/your_user_name/Downloads/boa-constructor-0.6.1).
Then: "grep" for every file containing NO_3D (or use whatever you want to search for a string in a set of files, I don't know how windows does this): In my case I did: grep -ir NO_3D *
A list of files comes up. Simply edit each such file (there are ~6) and remove any mentioning of "wx.NO_3D".
E.g., in Companions/BaseCompanions.py I find a match:
"self.windowStyles = ['wx.CAPTION', 'wx.MINIMIZE_BOX', 'wx.MAXIMIZE_BOX',
        'wx.THICK_FRAME', 'wx.SIMPLE_BORDER', 'wx.DOUBLE_BORDER',
        'wx.SUNKEN_BORDER', 'wx.RAISED_BORDER', 'wx.STATIC_BORDER',.
        'wx.TRANSPARENT_WINDOW', 'wx.NO_3D', 'wx.TAB_TRAVERSAL',.
        'wx.WANTS_CHARS', 'wx.NO_FULL_REPAINT_ON_RESIZE', 'wx.VSCROLL',.
        'wx.HSCROLL', 'wx.CLIP_CHILDREN', 'wx.NO_BORDER', 'wx.ALWAYS_SHOW_SB']"
You see the 'wx.NO_3D' in the middle somewhere. Remove it and save the file. Keep doing this for all files.
However, there is a minor complication in one file: "Inspector.py". Here, you cannot simply remove wx.NO_3D. In particular, the match is: self.categories = wx.SplitterWindow(self, -1, style=wx.NO_3D | wx.SP_3D | wx.SP_LIVE_UPDATE)
What I did was to replace "style=wx.NO_3D" with "style=wx.DEFAULT_FRAME_STYLE" (I found this default name in one of the other files; you see how there are different "styles" recognized by the program so I just chose some other style than NO_3D).
Then I just ran Boa with: "python Boa.py"
and it worked (assuming you have the module wx installed and whatever else is needed for Boa to run in the first place of course).
参考:

阅读(2012) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~