#/usr/bin/env/ python (1)起始行
"this is a test module " (2)模块文档
import sys
import os (3)模块导入
debug = True (4)全局变量的定义(尽量避免)
class FooClass (object):
"Foo class Doc" (5)类定义 (若有)
pass
.... ......
def test():
"test function doc" (6) 函数定义(若有)
..........................
if __name__ == '__main__': (7)主程序
test()
posted on 2009-01-24 23:25
RUI 阅读(1078)
评论(0) 编辑 收藏 引用