python 事例
时间:2010-05-14 来源:terry-xcb
1.def post_installation(self):
script_list = []
sfile = os.listdir(g_script_dir) for file in sfile:
if None != re.search(r'_post-install.[a-z][a-z]\Z', file):
script_list.append(file) script_list.sort() for item in script_list:
if 0 != os.system('sh ' + g_script_dir + item):
sys.exit(OS_SYSTEM__EC)
script_list = []
sfile = os.listdir(g_script_dir) for file in sfile:
if None != re.search(r'_post-install.[a-z][a-z]\Z', file):
script_list.append(file) script_list.sort() for item in script_list:
if 0 != os.system('sh ' + g_script_dir + item):
sys.exit(OS_SYSTEM__EC)
相关阅读 更多 +