00001 #!/bin/env python 00002 # 00003 from sys import argv 00004 def cfgName2py(cfgName): 00005 result = cfgName.replace("/data/","/python/").replace(".","_") 00006 # do we want to automatically move all test configs to python/test? 00007 # just do cffs and cfis for now 00008 if result.endswith('.cff') or result.endswith('.cfi'): 00009 result = result.replace("/test/", "/python/test/") 00010 return result + '.py' 00011 00012 # for shell-scripters who want a value printed 00013 if __name__=="__main__": 00014 if len(argv) == 2: 00015 print cfgName2py(argv[1])