@@ -96,6 +96,9 @@ <h2 class="center white-text">Loading Python Interpreter</h2>
96
96
< a class ="btn-floating btn-small waves-effect waves-light zoom-button "
97
97
onclick ="terminal.terminal.clear() "> < i
98
98
class ="material-icons "> delete</ i > </ a >
99
+ < a class ="btn-floating btn-small waves-effect waves-light zoom-button "
100
+ onclick ="restart_toplevel() "> < i
101
+ class ="material-icons "> refresh</ i > </ a >
99
102
</ div >
100
103
101
104
<!-- Quick execute and clean console on mobile -->
@@ -162,6 +165,9 @@ <h4>Configuration</h4>
162
165
class ="material-icons "> remove</ i > </ a >
163
166
</ div >
164
167
</ div >
168
+ < a class ="waves-effect waves-light btn config-element " onclick ="restart_toplevel() "> < i
169
+ class ="material-icons right "> refresh</ i > Reset
170
+ Python Interpreter</ a >
165
171
< h4 > Help</ h4 >
166
172
< a href ="#shortcut " class ="waves-effect waves-light btn shortcut-button modal-trigger "> < i
167
173
class ="material-icons right "> code</ i > Shortcuts</ a >
@@ -336,8 +342,11 @@ <h4>Graphics main window</h4>
336
342
337
343
addEventListener ( "mpy:ready" , ( ) => {
338
344
// show running for an instance
345
+ console . log ( "Python interpreter ready" )
339
346
$ ( '#loader-wrapper' ) . addClass ( "tester" )
340
- terminal . terminal . loadAddon ( terminalFitter ) ;
347
+ // check if the terminal is ready
348
+ let local_terminal = document . querySelector ( "#toplevel-terminal" ) ;
349
+ local_terminal . terminal . loadAddon ( terminalFitter ) ;
341
350
terminalFitter . fit ( ) ;
342
351
change_font_size ( "toplevel" , 0 ) ;
343
352
} ) ;
0 commit comments