forked from theskumar/python-dotenv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve interactive mode detection (theskumar#183)
* Improve interactive mode detection Previously, this checked whether __file__ was defined in globals(). globals() is tied to the current module, so this will always be defined. Fix this by importing __main__ and asking whether it has __file__ defined. This approach is outlined in stackoverflow.com/a/2356420. Thanks @andrewsmith
- Loading branch information
Saurabh Kumar
authored
Jun 2, 2019
1 parent
6d6e18f
commit 16f0fa6
Showing
2 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters