随笔分类 -  python

摘要:python 中__name__ = '__main__' 的作用,到底干嘛的? 有句话经典的概括了这段代码的意义: “Make a script both importable and executable” 意思就是说让你写的脚本模块既可以导入到别的模块中用,另外该模块自己也可执行。 这句话,可 阅读全文
posted @ 2018-03-27 17:07 三江汇流 阅读(1199) 评论(0) 推荐(0)
摘要:转载于(http://www.cnblogs.com/tk091/p/3700013.html),感谢作者 有人说:virtualenv、fabric 和 pip 是 pythoneer 的三大神器。 不管认不认同,至少要先认识一下,pip现在倒是经常用到,virtualenv第一次听说,不过,总得 阅读全文
posted @ 2016-03-14 17:33 三江汇流 阅读(238) 评论(0) 推荐(0)
摘要:class A(object): # A must be new-style class def __init__(self): print "enter A" print "leave... 1 2 3 4 5 6 7 8 9 10 class A(object): # A must be new 阅读全文
posted @ 2016-01-28 15:05 三江汇流 阅读(778) 评论(0) 推荐(0)