摘要:
python中提供了很便捷的方法来判断两个文件的内容是否相同,只要两行代码: >>>import filecmp >>>filecmp.cmp(r'e:\1.txt',r'e:\2.txt') 如果两个文件相同,会输出True,否则会输出false。 怎么样,很简单吧 阅读全文
posted @ 2005-03-02 21:59 Cure 阅读(14124) 评论(2) 推荐(0)
|
|||
|
摘要:
python中提供了很便捷的方法来判断两个文件的内容是否相同,只要两行代码: >>>import filecmp >>>filecmp.cmp(r'e:\1.txt',r'e:\2.txt') 如果两个文件相同,会输出True,否则会输出false。 怎么样,很简单吧 阅读全文
posted @ 2005-03-02 21:59 Cure 阅读(14124) 评论(2) 推荐(0)
摘要:
在python中和.net一样可以根据类名来动态生成类的实例,但是比.net更方便,下面的例子使用python2.4的idle的IDE环境, .py文件代码如下: class Employee: def __init__(self,name,age,address): print 'name :',name print 'age :... 阅读全文
posted @ 2005-03-02 21:31 Cure 阅读(2139) 评论(0) 推荐(0) |
|||