Go to the documentation of this file.00001
00002
00003 import sys
00004 import os
00005
00006 def destroy_and_make(dirname):
00007 print "remake : dirname : ", dirname
00008
00009 try:
00010
00011 os.rename(dirname, dirname + '_')
00012 except:
00013 print "Directory \"" + dirname + "\" not found."
00014
00015
00016 try:
00017 os.system("./setuptest.py " + dirname + " ")
00018 except:
00019 print "Directory \"" + dirname + "\" already exists."
00020
00021
00022
00023
00024 dirname = sys.argv[1]
00025
00026
00027 if dirname != 'all':
00028 print "Usage : " + sys.argv[0] + " all";
00029 exit(1)
00030
00031 for pwd, dirs, files in os.walk('.'):
00032
00033 break
00034
00035 for d in dirs:
00036 if d.rfind("Servant") > 0:
00037 print d, d.rfind("Servant")
00038 destroy_and_make(d)
00039
00040
00041
00042
00043 exit(0)
00044