2004年05月24日 星期一 15:05
python-chinese,您好! 我用wxPython 做的编辑器NewEdit即将发布,有兴趣地请去我的blog查阅。 现在还没有正式版正可以下载,只可以从cvs中取得。有兴趣的请与我交流。 致 礼! limodou chatme at 263.net 2004-05-24
2004年05月24日 星期一 15:19
Hollo limodou: 好也! 一定要试用哪! NewEdit 是在 DrPython 的基础上?! 还是原来 FlyEdit 的升级? /******** [2004-05-24]15:18:18 ; limodou wrote: limodou> python-chinese,您好! limodou> 我用wxPython limodou> 做的编辑器NewEdit即将发布,有兴趣地请去我的blog查阅。 limodou> 现在还没有正式版正可以下载,只可以从cvs中取得。有兴趣的请与我交流。 limodou> 致 limodou> 礼! limodou> limodou limodou> chatme at 263.net limodou> 2004-05-24 ********************************************/ -- Free as in Freedom Zoom.Quiet #=========================================# ]Time is unimportant, only life important![ #=========================================# sender is the Bat!2.02 CE
2004年05月24日 星期一 16:00
limodou,您好!
你好,我用单独的语句
menu = wxMenu()
str1=unicode("启动服务", 'cp936')
但是仍然出错:
File "D:\ᄊÌÐÅ\ᄎþᄆᄆÓÊÕþ\guiserver.py", line 26, in __init__
str1=unicode("启动服务", 'cp936')
UnicodeDecodeError: 'gbk' codec can't decode bytes in position 2-3: illegal multibyte sequence
请指点,谢谢。
======= 2004-05-24 15:03:38 您在来信中写道:=======
>info,您好!
>
> 你只转了一处,而且可以将转码语句独立出来看一看转换会不会报错。建议使用cp936(GBK编码).
>
>======= 2004-05-24 14:34:47 您在来信中写道:=======
>
>>limodou,您好!
>>
>> 我按照你的方法,将源代码更改为:
>> menu = wxMenu()
>> menu.Append(ID_START, (unicode("启动服务", 'gb2312')), "启动短信收发服务")
>> menu.Append(ID_STOP, "停止服务", "停止短信收发服务")
>>
>>在windows2000平台下提示错误:
>>menu.Append(ID_START, (unicode("启动服务", 'gb2312')), "启动短信收发服务")
>> File "C:\PYTHON23\Lib\site-packages\wx\core.py", line 7314, in Append
>> return _core.Menu_Append(*args, **kwargs)
>>TypeError: Unable to convert string
>>
>>请给予指点,谢谢!
>>
>>
>>======= 2004-05-24 13:01:33 您在来信中写道:=======
>>
>>>info,您好!
>>>
>>> 如果使用unicode版本的话,首先根据文件的编码方式转成unicode,然后再加入到wxPython中即可。如,使用cp936编码(简体中文windows的缺省编码方式),可以:
>>>text=open(filename, 'rb').read()
>>>s = unicode(text, 'cp936')
>>>再将s插入到编辑器中即可。
>>>如果已经知道文件为utf-8编码,可以
>>>text=open(filename, 'rb').read()
>>>s = unicode(text, 'utf-8')
>>>
>>>======= 2004-05-24 10:30:39 您在来信中写道:=======
>>>
>>>>python-chinese,您好!
>>>> 我使用的是freebsd4.8的系统+kde3.1,在kde下能正确显示中文和繁体字。通过内置的编辑工具也能以gb18030、gb2312和utf-8方式查看代码中的中文,但是用utf-8方式查看源文件显示为乱码。
>>>>
>>>>
>>>> 致
>>>>礼!
>>>>
>>>>
>>>> info
>>>> info at xichen.com
>>>> 2004-05-24
>>>>_______________________________________________
>>>>python-chinese list
>>>>python-chinese at lists.python.cn
>>>>http://python.cn/mailman/listinfo/python-chinese
>>>>
>>>
>>>= = = = = = = = = = = = = = = = = = = =
>>>
>>>
>>> 致
>>>礼!
>>>
>>>
>>> limodou
>>> chatme at 263.net
>>> 2004-05-24
>>>
>>>_______________________________________________
>>>python-chinese list
>>>python-chinese at lists.python.cn
>>>http://python.cn/mailman/listinfo/python-chinese
>>>
>>
>>= = = = = = = = = = = = = = = = = = = =
>>
>>
>> 致
>>礼!
>>
>>
>> info
>> info at xichen.com
>> 2004-05-24
>>
>>_______________________________________________
>>python-chinese list
>>python-chinese at lists.python.cn
>>http://python.cn/mailman/listinfo/python-chinese
>>
>
>= = = = = = = = = = = = = = = = = = = =
>
>
> 致
>礼!
>
>
> limodou
> chatme at 263.net
> 2004-05-24
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese
>
= = = = = = = = = = = = = = = = = = = =
致
礼!
info
info at xichen.com
2004-05-24
Zeuux © 2025
京ICP备05028076号