code: def basename(path, ext=""):
      
      import os.path
      if ext is False:
          return os.path.basename(path).replace(extname(path), "")
      else:
          return os.path.basename(path).replace(ext, "")
docs: Return the file base name from *path*