Python论坛  - 讨论区

标题:[python-chinese] wxPython中如何显示中文?

2004年09月29日 星期三 13:18

NetSnail ddk at std.uestc.edu.cn
Wed Sep 29 13:18:41 HKT 2004

但是,在linux下就会出现找不到cp936字体的情况,
请问各位大侠有什么办法阿?
0.706 wrote:

>0.706,您好! 
>
>  错了,是cp936
>
>======== 2004-09-25 08:10:53 您在来信中写道: ========
>
>xl g,您好! 
>
>  在文件第一行或第二行写上
># -*- encoding=p936 -*-
>
>就可以直接用u'你好Python'了.
>
>
>======== 2004-09-24 17:19:04 您在来信中写道: ========
>
>多谢,这样确实能解决问题,还有没有简便一些的办法,比如只需要在脚本开头声明一个预处理语句或者其它什么东西,然后就可以一劳永逸的显示中文编码,而不用每次都unicode()。
>
>limodou <limodou at gmail.com> wrote: 
>u'你好Python!'改为unicode('你好Python', 'cp936')
>并且使用wxPython 的unicode版本。
>
>
>On Fri, 24 Sep 2004 10:55:31 +0800 (CST), xl g wrote:
>  
>
>>昨天刚刚接触wxPython,问个简单的问题,如何在界面中显示中文?如下面的代码:
>>class MyApp(wxApp):
>>def OnInit(self):
>>frame = wxFrame(NULL, -1, u'你好Python!')
>>frame.Show(true)
>>self.SetTopWindow(frame)
>>return true
>>
>>标题中显示的是乱码,不知该如何让它显示正确的中文?请指教!
>>
>>gxl 敬上
>>
>>_________________________________________________________
>>Do You Yahoo!?
>>150万曲MP3疯狂搜,带您闯入音乐殿堂
>>http://music.yisou.com/
>>美女明星应有尽有,搜遍美图、艳图和酷图
>>http://image.yisou.com
>>1G就是1000兆,雅虎电邮自助扩容!
>>http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
>>_______________________________________________
>>python-chinese list
>>python-chinese at lists.python.cn
>>http://python.cn/mailman/listinfo/python-chinese
>>
>>    
>>
>
>
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese
>  
>



[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年09月29日 星期三 13:23

dreamingk(天成) dreamingker at 163.com
Wed Sep 29 13:23:07 HKT 2004

SEQsxPq6w6OhDQoNCgmyu8TctPO55sSjvtu74aOsxOPX1Ly60KG3ts6n0KG+29K7z8LSsr/J0tSw
oaGjDQoNCj09PT09PT0gMjAwNC0wOS0yOSAxMzowNjoyMSDE+tTawLTQxdbQ0LS1wKO6PT09PT09
PQ0KDQo+z9bU2r+0wLTKx8O7vLi49sjLwcsgOikNCj4NCj4NCj5PbiBXZWQsIDI5IFNlcCAyMDA0
IDExOjM2OjM1ICswODAwLCBjaGlmZW5nIDxjaGlmZW5nQGdtYWlsLmNvbT4gd3JvdGU6DQo+PiDI
y7bgsru24KO/o78NCj4+IM7S0rLM7cnPo7+jv6O/DQo+PiANCj4+IE9uIFdlZCwgMjkgU2VwIDIw
MDQgMTA6NDI6NDUgKzA4MDAsIFpvb20gUXVpZXQgPHpvb20ucXVpZXRAZ21haWwuY29tPiB3cm90
ZToNCj4+ID4ghpSGlIaUo6G087zS0rvG8L2rSEQgzqfXoaOsz9azob+0y/vSu7K9vasgQ29tcGFz
cyC/8rzctPrC69C0s/bAtKOhDQo+PiA+IL340NDSu7TOIDE6TiC1xLOsvKvP3szl0enKx9KyuvWj
oaOho6GjoQ0KPj4gPg0KPj4gPiC5/rn+uf6joQ0KPj4gPg0KPj4gPg0KPj4gPiBPbiBXZWQsIDI5
IFNlcCAyMDA0IDEwOjMyOjU5ICswODAwLCBIRCA8aGRjb2xhQGdtYWlsLmNvbT4gd3JvdGU6DQo+
PiA+ID4guse6x6Os1ebT0NXiu9jKwsLwo7+6w9G9o6zO0rP2s6e12KOhyrG85LTzvNK/7Mi3yM/S
u8/CsNWhow0KPj4gPiA+DQo+PiA+ID4gLS0tLS0gT3JpZ2luYWwgTWVzc2FnZSAtLS0tLQ0KPj4g
PiA+IEZyb206IHRvY2VyIDx0b290b29AeWVhaC5uZXQ+DQo+PiA+ID4gRGF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+PiA+IHB5dGhvbi1jaGluZXNlQGxpc3RzLnB5dGhvbi5jbg0KPj4gPiBodHRwOi8v
cHl0aG9uLmNuL21haWxtYW4vbGlzdGluZm8vcHl0aG9uLWNoaW5lc2UNCj4+ID4NCj4+IA0KPj4g
LS0NCj4+IHJlZ2FyZHMuDQo+PiBjaGlmZW5nDQo+PiBfX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fXw0KPj4gcHl0aG9uLWNoaW5lc2UgbGlzdA0KPj4gcHl0aG9u
LWNoaW5lc2VAbGlzdHMucHl0aG9uLmNuDQo+PiBodHRwOi8vcHl0aG9uLmNuL21haWxtYW4vbGlz
dGluZm8vcHl0aG9uLWNoaW5lc2UNCj4+IA0KPg0KPg0KPg0KPi0tIA0KPkhEo6jIvMnV1tC1xLvw
o6kNCj7O0rmk1/fO0r/swNajrM7Sx9q33M7SytW78aGjx+vT687S0rvG8L/swNajrNPrztLSu8bw
ytW78aGjDQo+X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18N
Cj5weXRob24tY2hpbmVzZSBsaXN0DQo+cHl0aG9uLWNoaW5lc2VAbGlzdHMucHl0aG9uLmNuDQo+
aHR0cDovL3B5dGhvbi5jbi9tYWlsbWFuL2xpc3RpbmZvL3B5dGhvbi1jaGluZXNlDQoNCj0gPSA9
ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPQ0KCQkJDQoNCqGhoaGhoaGhoaGhoaGh
oaHWwg0KwPGjoQ0KIA0KCQkJCSANCqGhoaGhoaGhoaGhoaGhoaFkcmVhbWluZ2sozOyzySkNCqGh
oaGhoaGhoaGhoaGhoaFkcmVhbWluZ2tlckAxNjMuY29tDQqhoaGhoaGhoaGhoaGhoaGhoaGhoTIw
MDQtMDktMjkNCg0K




[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年09月29日 星期三 13:35

雄建 xiongjian at staff.sina.com.cn
Wed Sep 29 13:35:00 HKT 2004

Zoom Quiet,您好!

	       大家好,感谢为我提供了搭建wiki的宝贵文档,在这些文档的参考下,我昨天成功的搭建了一个wiki系统在RedHat 9.0系统上,这里是我刚写的一个大建总结,请教大家修改我总结不够之处
   http://wiki.woodpecker.org.cn/moin.cgi/hero_5fever

======= 2004-09-28 09:10:54 您在来信中写道:=======

>咳咳!谈不上经验!
>都是失败的经历!
>先后尝试过 Zwiki, phpWiki,Tavi,Wowo等等Wiki 系统,还是 MoinMoin 听话哪!
>安装过程到是什么什么的,
>也就一直没有整理出来,
>但是网络中有很多详细的过程介绍哪!
>啄木鸟中就有
>http://wiki.woodpecker.org.cn/moin.cgi/0_2e706#
>http://wiki.woodpecker.org.cn/moin.cgi/bsd_2fMoinmoinInstallHowto
>
>两个版本,
>其实最直接的是理解Moin自身的文档哪!
>http://wiki.woodpecker.org.cn/moin.cgi/MoinMoin_2fInstallDocs
>
>以上!其实Apache 编译好,其它的无非是设置而已了!
>
>
>On Mon, 27 Sep 2004 20:1:5 +0800, GreyRoar <greyroar at tom.com> wrote:
>> 雄建,您好!
>> 
>>          搭建一个wiki系统这个问题应该请问ZoomQ、HD这样有丰富经验的人士,我想在他有时间的时候会对你的问题给出适当的回答的。
>> 
>> ======= 2004-09-27 18:04:00 您在来信中写道:=======
>> 
>> 
>> 
>> >GreyRoar,您好!
>> >
>> >       收到你的来信,我正线搭建一个wiki系统,在哪里找这些安装步骤
>> >
>> >======= 2004-09-27 17:59:18 您在来信中写道:=======
>> >
>> >>Zoom Quiet,您好!
>> >>
>> >>      python-cn at python.8866.org上就两个人重复重复再重复的测试,又没有什么实质性的内容或讨论,没人关注也是正常的
>> >>
>> >>======= 2004-09-27 15:06:00 您在来信中写道:=======
>> >>
>> >>>怎么只有两人有关注新的 Plone 社区??
>> >>>现在我发现的问题:
>> >>>IE打开时,第一次总是询问是否要下载,第二次才显示页面!!!
>> >>>
>> >>>现在 python.8866.org 的列表镜像非常稳定了!而且也在尝试启动新的基于 Zope 的列表,大家也可以贡献其它方面的内容在社区新模型中哪!
>> >>>
>> >>>--
>> >>>[Time is unimportant, only life important!]
>> >>>_______________________________________________
>> >>>python-chinese list
>> >>>python-chinese at lists.python.cn
>> >>>http://python.cn/mailman/listinfo/python-chinese
>> >>
>> >>= = = = = = = = = = = = = = = = = = = =
>> >>
>> >>
>> >>致
>> >>礼!
>> >>
>> >>
>> >>GreyRoar
>> >>GreyRoar at tom.com
>> >>2004-09-27
>> >>
>> >>
>> >>
>> >>
>> >>_______________________________________________
>> >>python-chinese list
>> >>python-chinese at lists.python.cn
>> >>http://python.cn/mailman/listinfo/python-chinese
>> >>
>> >>
>> >>.
>> >
>> >= = = = = = = = = = = = = = = = = = = =
>> >
>> >
>> >致
>> >礼!
>> >
>> >
>> >雄建
>> >xiongjian at staff.sina.com.cn
>> >2004-09-27
>> >
>> >_______________________________________________
>> >python-chinese list
>> >python-chinese at lists.python.cn
>> >http://python.cn/mailman/listinfo/python-chinese
>> 
>> = = = = = = = = = = = = = = = = = = = =
>> 
>>>> 礼!
>> 
>> GreyRoar
>> GreyRoar at tom.com
>> 2004-09-27
>> 
>> 
>> 
>> 
>> _______________________________________________
>> python-chinese list
>> python-chinese at lists.python.cn
>> http://python.cn/mailman/listinfo/python-chinese
>> 
>
>
>
>-- 
>[Time is unimportant, only life important!]
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese
>
>
>.

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        雄建
        xiongjian at staff.sina.com.cn
          2004-09-29


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年09月29日 星期三 13:47

limodou limodou at gmail.com
Wed Sep 29 13:47:02 HKT 2004

建议使用utf-8,要不自已装一个cjk的包。在python.cn上那个不知道是不是。还有就是使用2.4版,里面有cjk的包。


On Wed, 29 Sep 2004 13:18:41 +0800, NetSnail <ddk at std.uestc.edu.cn> wrote:
> 但是,在linux下就会出现找不到cp936字体的情况,
> 请问各位大侠有什么办法阿?
> 0.706 wrote:
> 
> >0.706,您好!
> >
> >错了,是cp936
> >
> >======== 2004-09-25 08:10:53 您在来信中写道: ========
> >
> >xl g,您好!
> >
> >在文件第一行或第二行写上
> ># -*- encoding=p936 -*-
> >
> >就可以直接用u'你好Python'了.
> >
> >
> >======== 2004-09-24 17:19:04 您在来信中写道: ========
> >
> >多谢,这样确实能解决问题,还有没有简便一些的办法,比如只需要在脚本开头声明一个预处理语句或者其它什么东西,然后就可以一劳永逸的显示中文编码,而不用每次都unicode()。
> >
> >limodou <limodou at gmail.com> wrote:
> >u'你好Python!'改为unicode('你好Python', 'cp936')
> >并且使用wxPython 的unicode版本。
> >
> >
> >On Fri, 24 Sep 2004 10:55:31 +0800 (CST), xl g wrote:
> >
> >
> >>昨天刚刚接触wxPython,问个简单的问题,如何在界面中显示中文?如下面的代码:
> >>class MyApp(wxApp):
> >>def OnInit(self):
> >>frame = wxFrame(NULL, -1, u'你好Python!')
> >>frame.Show(true)
> >>self.SetTopWindow(frame)
> >>return true
> >>
> >>标题中显示的是乱码,不知该如何让它显示正确的中文?请指教!
> >>
> >>gxl 敬上
> >>
> >>_________________________________________________________
> >>Do You Yahoo!?
> >>150万曲MP3疯狂搜,带您闯入音乐殿堂
> >>http://music.yisou.com/
> >>美女明星应有尽有,搜遍美图、艳图和酷图
> >>http://image.yisou.com
> >>1G就是1000兆,雅虎电邮自助扩容!
> >>http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
> >>_______________________________________________
> >>python-chinese list
> >>python-chinese at lists.python.cn
> >>http://python.cn/mailman/listinfo/python-chinese
> >>
> >>
> >>
> >
> >
> >
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >python-chinese list
> >python-chinese at lists.python.cn
> >http://python.cn/mailman/listinfo/python-chinese
> >
> >
> 
> 
> 
> _______________________________________________
> python-chinese list
> python-chinese at lists.python.cn
> http://python.cn/mailman/listinfo/python-chinese
> 



-- 
I like python!


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号