code: def get_dirtree(module_name, dirlist=[]):
      '''
      module_name-->str: must be name of a dir under current working dir
      dirlist-->list of str: must all be names of dirs under module_name
      '''
      ret = []
      curdir = os.getcwd()
      if not os.path.isdir(module_name):
          return ret
      os.chdir(module_name)
      try:
          for dirname in dirlist:
              if not os.path.isdir(dirname):
                  continue
              for (d, ds, fs) in os.walk(dirname):
                  for f in fs:
                      ret += [os.path.join(d, f)]
          return ret
      except:
          return ret
      finally:
          os.chdir(curdirf get_dirtree(module_name, dirlist=[]):
      '''
      module_name-->str: must be name of a dir under current working dir
      dirlist-->list of str: must all be names of dirs under module_name
      '''
      ret = []
      curdir = os.getcwd()
      if not os.path.isdir(module_name):
          return ret
      os.chdir(module_name)
      try:
          for dirname in dirlist:
              if not os.path.isdir(dirname):
                  continue
              for (d, ds, fs) in os.walk(dirname):
                  for f in fs:
                      ret += [os.path.join(d, f)]
          return ret
      except:
          return ret
      finally:
          os.chdir(curdir)
docs: module_name-->str: must be name of a dir under current working dir
      dirlist-->list of str: must all be names of dirs under module_name