code: def makeDataFiles(prefix, dir):
      
      # Strip 'dir/' from of path before joining with prefix
      dir = dir.rstrip('/')
      strip = len(dir) + 1
      found = []
      os.path.walk(dir, visit, (prefix, strip, found))
      #print found[0]
      return found[0]
docs: Create distutils data_files structure from dir
      distutil will copy all file rooted under dir into prefix, excluding
      dir itself, just like 'ditto src dst' works, and unlike 'cp -r src
      dst, which copy src into dst'.
      Typical usage:
          # install the contents of 'wiki' under sys.prefix+'share/moin'
          data_files = makeDataFiles('share/moin', 'wiki')
      For this directory structure:
          root
              file1
              file2
              dir
                  file
                  subdir
                      file
      makeDataFiles('prefix', 'root')  will create this distutil data_files structure:
          [('prefix', ['file1', 'file2']),
           ('prefix/dir', ['file']),
           ('prefix/dir/subdir', ['file'])]