2004年05月24日 星期一 17:14
info,您好! 好的。 ======= 2004-05-24 16:57:19 您在来信中写道:======= >limodou,您好! > > 谢谢了,我把freebsd系统准备换成5.2.1的,可能对中文支持好点,如果问题还是不能解决,还是要请教你了。 > >======= 2004-05-24 16:29:44 您在来信中写道:======= > >>info,您好! >> >> 要使用unicode必须要使用带u的版本。使用不带u的当然也可以处理中文,但处理方法就有区别了,还有就是编辑器可能会出现半个汉字的问题,不过注意的话也是没有问题的。还有就是编辑器中移动光标不准确。都是指wxStyledTextCtrl控件而言,别的没试。 >> >>======= 2004-05-24 16:22:06 您在来信中写道:======= >> >>>limodou,您好! >>> >>> 我使用的是没有u的版本,但是我在freebsd系统下的也不能运行啊。是不是非要带u的版本才能正常显示中文?我的windows2000下的运行是正常的,但是是不带u的。 >>> 谢谢了。 >>> >>>======= 2004-05-24 16:15:38 您在来信中写道:======= >>> >>>>info,您好! >>>> >>>> 你在python环境下试了吗?如果没有问题,请确认你使用的wxPython是unicode版本。就是压缩包中有u的那个,只能使用这个才可以对unicode进行处理。 >>>> >>>> >>>>_______________________________________________ >>>>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 > >_______________________________________________ >python-chinese list >python-chinese at lists.python.cn >http://python.cn/mailman/listinfo/python-chinese > = = = = = = = = = = = = = = = = = = = = 致 礼! limodou chatme at 263.net 2004-05-24
2004年05月25日 星期二 08:55
limodou,您好!
FreeBSD 4.10-RELEASE版本可能这几天就发布了,我准备等到新版本发布再安装。免得老编译内核把笔记本硬盘都这个坏了。
过两天再向你请教。谢谢了。
======= 2004-05-24 17:14:03 您在来信中写道:=======
>info,您好!
>
> 好的。
>
>======= 2004-05-24 16:57:19 您在来信中写道:=======
>
>>limodou,您好!
>>
>> 谢谢了,我把freebsd系统准备换成5.2.1的,可能对中文支持好点,如果问题还是不能解决,还是要请教你了。
>>
>>======= 2004-05-24 16:29:44 您在来信中写道:=======
>>
>>>info,您好!
>>>
>>> 要使用unicode必须要使用带u的版本。使用不带u的当然也可以处理中文,但处理方法就有区别了,还有就是编辑器可能会出现半个汉字的问题,不过注意的话也是没有问题的。还有就是编辑器中移动光标不准确。都是指wxStyledTextCtrl控件而言,别的没试。
>>>
>>>======= 2004-05-24 16:22:06 您在来信中写道:=======
>>>
>>>>limodou,您好!
>>>>
>>>> 我使用的是没有u的版本,但是我在freebsd系统下的也不能运行啊。是不是非要带u的版本才能正常显示中文?我的windows2000下的运行是正常的,但是是不带u的。
>>>> 谢谢了。
>>>>
>>>>======= 2004-05-24 16:15:38 您在来信中写道:=======
>>>>
>>>>>info,您好!
>>>>>
>>>>> 你在python环境下试了吗?如果没有问题,请确认你使用的wxPython是unicode版本。就是压缩包中有u的那个,只能使用这个才可以对unicode进行处理。
>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>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
>>
>>_______________________________________________
>>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-25
2004年05月25日 星期二 10:56
liux at gdcn.com,您好! 多线程的继承和线程操作的问题终于解决了。代码如下,特别感谢刘鑫给我的帮助。 # -*- coding: cp936 -*- import threading,time import sys class mythread(threading.Thread):#继承线程的类 def __init__(self, group=None, target=None, name=None, args=(), kwargs={}): threading.Thread.__init__(self, group, target, name, args, kwargs)#继承父类构造 self.running=0 def run(self): self.running=1 i=0 while i<10 and self.running==1: i+=1 print str(x)+':'+str(i) time.sleep(0.01) class test: def __init__(self): self.threadobj=mythread() self.threadlist=[] def start(self,x):#启动线程 self.threadobj = mythread() self.threadobj.start() self.threadlist.append(self.threadobj) test1=test() for x in range(5): test1.start(x) time.sleep(0.01) print '共有线程:',threading.activeCount() for k in threading._active.keys(): if threading._active[k] in test1.threadlist: threading._active[k].running=0 del threading._active[k] print '还剩线程: ',threading.activeCount() while 1: pass ======== 2004-05-20 15:41:43 您在来信中写道: ======== ----- 原邮件 ----- 从: "info at xichen.com" <info at xichen.com> 日期: 星期四, 五月 20日, 2004 下午2:56 主题: [python-chinese] 各位,还有一个继承的问题请教大家。 > python-chinese,您好! > 我写的一个多线程程序碰到问题。 > 我的思路是在一个类中继承其他类的方法和属性,然后加以扩充并满足自己的需要,但是运行程序时出现错误。>>> > Traceback (most recent call last): > File "C:\Documents and Settings\Administrator\桌面\test.py", line > 29, in ? > test1.start(x) > File "C:\Documents and Settings\Administrator\桌面\test.py", line > 24, in start > self.threadobj(target=self.t1, args=(x, )).start() > TypeError: 'mythread' object is not callable > >>> > > 附上程序,请教各位了。 > > # -*- coding: cp936 -*- > import threading,time > import sys > class mythread(threading.Thread):#继承线程的类 构造函数的参数列表里少东西咯,应该是这样(斜体是后加的) > def __init__(self, group=None, target=None, name=None, args=(), kwargs={}): 其实最主要的是这里要改 > threading.Thread.__init__(self, group=None, target=None, name=None, args=(), kwargs={})#继承线程的属性 > self.running=0#增加一个属性用来判断是否应该结束 > > > class test: > def __init__(self): 这里注释掉了一行代码,不需要 #> self.threadobj=mythread() > self.threadlist=[] > def t1(self,count): > self.running=1#让线程处于可运行状态 > i=0 > while i<10 and self.running==1: > i+=1 > print str(x)+str(i) > if i>5:#循环次后,让线程处于中止状态 > self.running=0 > > def start(self,x):#启动线程 这里明显有问题,这样的代码在某些内存管理比较自由的语言里甚至有可能造成内存泄漏。应该修改为 self.threadobj = mythread(target=self.t1, args=(x, )) self.threadobj.start() > self.threadobj(target=self.t1, args=(x, )).start() 上面这行是错的 > self.threadlist.append(self.threadobj) > > test1=test() > for x in range(5): > test1.start(x) > > print '共有线程:',threading.activeCount() > for k in threading._active.keys(): 下面这行也是明显的错误,斜体是后加的 > if threading._active[k] in test1.threadlist: > threading._active[k].running=0 > del threading._active[k] > print '还剩线程: ',threading.activeCount() > > > > > 致 > 礼! > > > info > info at xichen.com > 2004-05-20 > = = = = = = = = = = = = = = = = = = = = = = 致 礼! info at xichen.com info at xichen.com 2004-05-25 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20040525/a59bd59f/attachment.htm
Zeuux © 2025
京ICP备05028076号