MCPcopy Index your code
hub / github.com/RustPython/RustPython / exists

Function exists

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

Source from the content-addressed store, hash-verified

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

Callers 4

_scriptFunction · 0.70
is_junctionMethod · 0.50

Calls 1

isdirMethod · 0.45