Python论坛  - 讨论区

标题:[python-chinese] (no subject)

2004年03月11日 星期四 10:52

zhao bear_sh at eastday.com
Thu Mar 11 10:52:07 HKT 2004

0.706,您好!

	是编码的问题吧。
原先的文件是什么编码?unicode

======= 2004-03-11 10:47:37 您在来信中写道:=======

>Jacob Fan,您好!
>
>	没有报告错误,但是生成的结果文件不对,pt.txt有360k,
>生成的ptz.txt只有1K,而且有乱码.
>
>======= 2004-03-11 10:35:00 您在来信中写道:=======
>
>>-----Original Message-----
>>From: 0.706 [mailto:0.706 at 163.com] 
>>Sent: 2004年3月11日 10:34
>>To: python-chinese
>>Subject: [python-chinese] (no subject)
>>
>>
>>>python-chinese,您好!
>>
>>>	请大家帮忙看看我的下述程序有什么问题,pt.txt是用
>>>win2000的输入法生成器产生的输入法源文件,我想对其进行处
>>>理后生成新的文件。可是现在连复制也做不到.
>>># -*- coding: cp936 -*-
>>>oldfile=file("pt.txt","r")
>>>newfile=file("ptz.txt","w")
>>
>>>lines=oldfile.readlines()
>>
>>>for line in lines:
>>>    newfile.write(line)
>>>oldfile.close()
>>>newfile.close()
>>
>>错在哪里?
>>_______________________________________________
>>python-chinese list
>>python-chinese at lists.python.cn
>>http://python.cn/mailman/listinfo/python-chinese
>
>= = = = = = = = = = = = = = = = = = = =
>			
>
>        致
>礼!
> 
>				 
>        0.706
>        0.706 at 163.com
>          2004-03-11
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese

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

        致
礼!
 
				 
        zhao
        bear_sh at eastday.com
          2004-03-11

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fox.gif
Type: image/gif
Size: 9519 bytes
Desc: not available
Url : http://lists.exoweb.net/pipermail/python-chinese/attachments/20040311/70d31f8e/fox.gif

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

2004年03月11日 星期四 10:57

0.706 0.706 at 163.com
Thu Mar 11 10:57:05 HKT 2004

大家好!

	 应该是unicode,那应该如何?

======= 2004-03-11 10:52:07 您在来信中写道:=======

>0.706,您好!
>
>	是编码的问题吧。
>原先的文件是什么编码?unicode
>
>======= 2004-03-11 10:47:37 您在来信中写道:=======
>
>>Jacob Fan,您好!
>>
>>	没有报告错误,但是生成的结果文件不对,pt.txt有360k,
>>生成的ptz.txt只有1K,而且有乱码.
>>
>>======= 2004-03-11 10:35:00 您在来信中写道:=======
>>
>>>-----Original Message-----
>>>From: 0.706 [mailto:0.706 at 163.com] 
>>>Sent: 2004年3月11日 10:34
>>>To: python-chinese
>>>Subject: [python-chinese] (no subject)
>>>
>>>
>>>>python-chinese,您好!
>>>
>>>>	请大家帮忙看看我的下述程序有什么问题,pt.txt是用
>>>>win2000的输入法生成器产生的输入法源文件,我想对其进行处
>>>>理后生成新的文件。可是现在连复制也做不到.
>>>># -*- coding: cp936 -*-
>>>>oldfile=file("pt.txt","r")
>>>>newfile=file("ptz.txt","w")
>>>
>>>>lines=oldfile.readlines()
>>>
>>>>for line in lines:
>>>>    newfile.write(line)
>>>>oldfile.close()
>>>>newfile.close()
>>>
>>>错在哪里?
>>>_______________________________________________
>>>python-chinese list
>>>python-chinese at lists.python.cn
>>>http://python.cn/mailman/listinfo/python-chinese
>>
>>= = = = = = = = = = = = = = = = = = = =
>>			
>>
>>        致
>>礼!
>> 
>>				 
>>        0.706
>>        0.706 at 163.com
>>          2004-03-11
>>
>>_______________________________________________
>>python-chinese list
>>python-chinese at lists.python.cn
>>http://python.cn/mailman/listinfo/python-chinese
>
>= = = = = = = = = = = = = = = = = = = =
>			
>
>        致
>礼!
> 
>				 
>        zhao
>        bear_sh at eastday.com
>          2004-03-11
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese

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

        致
礼!
 
				 
        0.706
        0.706 at 163.com
          2004-03-11


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

2004年03月11日 星期四 11:08

Gary Jia gary at exoweb.net
Thu Mar 11 11:08:37 HKT 2004

当然可以了

-----原始邮件-----
发件人: 163 [mailto:eyetoheart at 163.com]
发送时间: 2004年3月11日 11:24
收件人: python-chinese at lists.python.cn
主题: [python-chinese] 有一个问题


python能对文件进行copy、move操作吗?
 
 
 
 

---张道明---
******************************************************
*  北京英泰伟业通信技术开发有限公司
*  Tel:(010)62781150、62782640、62781708转635
*  Fax:(010)62794591
*  Email:zhangdm at intelware.com.cneyetoheart at 163.com
*  清华大学东门学研大厦A座三层307房间
******************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20040311/6a4c3c4a/attachment.html

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

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

    你的回复:

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

    Zeuux © 2024

    京ICP备05028076号