MCPcopy Index your code
hub / github.com/python/cpython / exists

Function exists

Lib/site.py:747–751  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

745 print(" %r," % (dir,))
746 print("]")
747 def exists(path):
748 if path is not None and os.path.isdir(path):
749 return "exists"
750 else:
751 return "doesn't exist"
752 print(f"USER_BASE: {user_base!r} ({exists(user_base)})")
753 print(f"USER_SITE: {user_site!r} ({exists(user_site)})")
754 print(f"ENABLE_USER_SITE: {ENABLE_USER_SITE!r}")

Calls 1

isdirMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…