2007年5月25日星期五

python tutorial 1

环境变量
系统shell查找路径(用于发现“python"): PATH
python模块查找路径(用于导入):PYTHONPATH
python交互启动文件路径:PYTHONSTARTUP
GUI扩展变量(Tkinter): TCL_LIBARAY, TK_LIBRARY


内置类型对象
number : 123, 3.12, 99L, 0x9ff, 0177, 4+3j, 4.0e+10
string: 'spam', "don't"
list: [1, [2, 'three'], 4]
dictionary: {'food':'spam', 'taste': 'yum'}
tuple: (1, 'spam', 4, 'U')
file: text = open('egg', 'r').read()

没有评论: