_os_path.py 487 B

12345678910111213141516171819202122
  1. # Copyright 2016 Google Inc.
  2. #
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. from os import path
  6. import glob
  7. def join(*pathnames):
  8. return path.join(*pathnames)
  9. def basename(pathname):
  10. return pathname.basename(pathname)
  11. def find_skps(skps):
  12. pathnames = list()
  13. for skp in skps:
  14. if (path.isdir(skp)):
  15. pathnames.extend(glob.iglob(path.join(skp, '*.skp')))
  16. else:
  17. pathnames.append(skp)
  18. return pathnames