python编写执行指定路径下的hotup.sh脚本

  

 python编写执行指定路径下的hotup.sh脚本

  
 <代码> # !/usr/bin/env python
  utf - 8编码:
  
  进口操作系统
  进口再保险
  导入系统
  
  num=[]
  game_gen_path='/数据/bz-tw-and/'
  在os.listdir dirs (game_gen_path):
  如果re.match (\ d + ', dirs):
  num.append (dirs [1]):
  数量=排序(地图(int, num))
  
  def调用(input_args):
  如果input_args==翱肌?
  我的号码:
  script_abs_path=game_gen_path + s + str(我)+ '/bin/hotup.sh '
  操作系统。系统(‘\ nsh % s \ n % script_abs_path)
  打印(' 033 \ 033 [31 m % d \ [0 m服务alerady执行' %我)
  
  if __name__==癬_main__”:
  代码调用(sys.argv [1])  

python编写执行指定路径下的hotup.sh脚本