Python skills

Some skills for Python programming

# 引入python中的traceback模块,跟踪错误
import traceback  
try:  
    a=b  
    b=c  
except:  
    traceback.print_exc()

# import
from sys import path
path.append('/home/deep/pyLib')
import func

# fill 0 in front of string
n='123'
s=n.zfill(5)
print s

# Copy file:
from shutil import copyfile
copyfile(“sourceFileName","targetFileName")