Skip to content

Commit

Permalink
ModuleNotFoundError in in_interactive_session (#24714)
Browse files Browse the repository at this point in the history
  • Loading branch information
dickreuter authored and jreback committed Jan 13, 2019
1 parent f02b548 commit 6c84005
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pandas/io/formats/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ def in_interactive_session():
from pandas import get_option

def check_main():
import __main__ as main
try:
import __main__ as main
except ModuleNotFoundError:
return get_option('mode.sim_interactive')
return (not hasattr(main, '__file__') or
get_option('mode.sim_interactive'))

Expand Down

0 comments on commit 6c84005

Please sign in to comment.