MCPcopy Index your code
hub / github.com/theskumar/python-dotenv / _is_interactive

Function _is_interactive

src/dotenv/main.py:343–351  ·  view source on GitHub ↗

Decide whether this is running in a REPL or IPython notebook

()

Source from the content-addressed store, hash-verified

341 """
342
343 def _is_interactive():
344 """Decide whether this is running in a REPL or IPython notebook"""
345 if hasattr(sys, "ps1") or hasattr(sys, "ps2"):
346 return True
347 try:
348 main = __import__("__main__", None, None, fromlist=["__file__"])
349 except ModuleNotFoundError:
350 return False
351 return not hasattr(main, "__file__")
352
353 def _is_debugger():
354 return sys.gettrace() is not None

Callers 1

find_dotenvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…