摘要:
一.1.basename #去掉目录路径,返回文件名os.path.basename("c:\temp\test.txt")输出:test.txt2.dirname #去掉文件名,返回目录路径os.path.dirname("c:\temp\test.txt")输出:'c:\\temp'3.join... 阅读全文
摘要:
Python try/except/finally等[代码块]x='abc'deffetcher(obj,index):returnobj[index]fetcher(x,4)输出:File"test.py",line6,infetcher(x,4)File"test.py",line4,infet... 阅读全文
摘要:
Simple Package Tool 学习1.getattr内置函数getattr(object,name[,default])python Packages.py install -p "$host_ip" -s "$build_series" -v "$build_version" -n "$... 阅读全文