|
|
我需要用基于unicode版本的WXGTK的WXPYTHON作一个图形界面的东东, 其中一个很小的代码是使用wxLabel的SetLabel改变某个Label显示的中文文本, 这个文本字符串需要是字符串A和字符串B连接起来, 其中字符串B是从别的地方过滤出来的,我无法控制其内容.
经过测试发现, 当字符串B为某些随机的值的时候, SetLabel将会显示Pango Assret fail. 原因不明.
具体代码如下:
- def ShowStatusStr(self,str):
- self.statustxt.SetLabel(unicode(str,GV_Encodeing,"replace"))
- app.Yield(True)
- return
复制代码
又或者显示了一半以后整个程序界面失去响应.
Can anybody help me? |
|