MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / _is_interactive

Function _is_interactive

src/dotenv/main.py:281–284  ·  view source on GitHub ↗

Decide whether this is running in a REPL or IPython notebook

()

Source from the content-addressed store, hash-verified

279 """
280
281 def _is_interactive():
282 """ Decide whether this is running in a REPL or IPython notebook """
283 main = __import__('__main__', None, None, fromlist=['__file__'])
284 return not hasattr(main, '__file__')
285
286 if usecwd or _is_interactive() or getattr(sys, 'frozen', False):
287 # Should work without __file__, e.g. in REPL or IPython notebook.

Callers 1

find_dotenvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected