remake_servants.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import sys
4 import os
5 
6 def destroy_and_make(dirname):
7  print "remake : dirname : ", dirname
8 
9  try:
10 # os.rmdir(os.path.abspath(dirname))
11  os.rename(dirname, dirname + '_')
12  except:
13  print "Directory \"" + dirname + "\" not found."
14 
15 
16  try:
17  os.system("./setuptest.py " + dirname + " ")
18  except:
19  print "Directory \"" + dirname + "\" already exists."
20 
21 
22 
23 
24 dirname = sys.argv[1]
25 #print os.path.abspath(dirname)
26 
27 if dirname != 'all':
28  print "Usage : " + sys.argv[0] + " all";
29  exit(1)
30 
31 for pwd, dirs, files in os.walk('.'):
32 # print "dirs : ", dirs
33  break
34 
35 for d in dirs:
36  if d.rfind("Servant") > 0:
37  print d, d.rfind("Servant")
39 
40 
41 #destroy_and_make(dirname)
42 
43 exit(0)
44 
def destroy_and_make(dirname)


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:44