要判断一个文件是否存在,可使用os.path.isfile()。
http://www.360doc.com/content/11/0416/18/2660674_110110352.shtml
亮点:
import os os.path.isfile('a.txt') #如果不存在就返回False
HxLauncher: Launch Android applications by voice commands