File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1098,6 +1098,17 @@ def in_interactive_session():
1098
1098
import __main__ as main
1099
1099
return not hasattr (main , '__file__' )
1100
1100
1101
+ def in_qtconsole ():
1102
+ """
1103
+ check if we're inside an IPython qtconsole
1104
+ """
1105
+ try :
1106
+ ip = get_ipython ()
1107
+ if ip .config ['KernelApp' ]['parent_appname' ] == 'ipython-qtconsole' :
1108
+ return True
1109
+ except :
1110
+ return False
1111
+
1101
1112
# Unicode consolidation
1102
1113
# ---------------------
1103
1114
#
Original file line number Diff line number Diff line change @@ -585,7 +585,10 @@ def _need_info_repr_(self):
585
585
particular DataFrame.
586
586
"""
587
587
588
- terminal_width , terminal_height = get_terminal_size ()
588
+ if com .in_qtconsole ():
589
+ terminal_width , terminal_height = 10 , 100
590
+ else :
591
+ terminal_width , terminal_height = get_terminal_size ()
589
592
max_rows = (terminal_height if get_option ("print_config.max_rows" ) == 0
590
593
else get_option ("print_config.max_rows" ))
591
594
max_columns = get_option ("print_config.max_columns" )
You can’t perform that action at this time.
0 commit comments