@@ -53,14 +53,17 @@ function executeCode(forceStartingInstr, forceRawInputLst) {
5353
5454 var backend_script = null ;
5555 if ( $ ( '#pythonVersionSelector' ) . val ( ) == '2' ) {
56- backend_script = python2_backend_script ;
56+ backend_script = '/exec_py2' ;
5757 }
5858 else if ( $ ( '#pythonVersionSelector' ) . val ( ) == '3' ) {
59- backend_script = python3_backend_script ;
59+ backend_script = '/exec_py3'
6060 }
61- // experimental KRAZY MODE!!!
62- else if ( $ ( '#pythonVersionSelector' ) . val ( ) == '2crazy' ) {
63- backend_script = python2crazy_backend_script ;
61+ else if ( $ ( '#pythonVersionSelector' ) . val ( ) == 'js' ) {
62+ backend_script = '/exec_js' ;
63+ }
64+ else {
65+ alert ( "Invalid version selector" ) ;
66+ assert ( false ) ;
6467 }
6568
6669 var backendOptionsObj = { cumulative_mode : ( $ ( '#cumulativeModeSelector' ) . val ( ) == 'true' ) ,
@@ -87,17 +90,13 @@ function executeCode(forceStartingInstr, forceRawInputLst) {
8790 // ExecutionVisualizer will be shown at a time
8891 visualizerIdOverride : '1' ,
8992 updateOutputCallback : function ( ) { $ ( '#urlOutput,#embedCodeOutput' ) . val ( '' ) ; } ,
90-
91- // undocumented experimental modes:
92- pyCrazyMode : ( $ ( '#pythonVersionSelector' ) . val ( ) == '2crazy' ) ,
93- holisticMode : ( $ ( '#cumulativeModeSelector' ) . val ( ) == 'holistic' )
9493 }
9594
96- executePythonCode ( pyInputGetValue ( ) ,
97- backend_script , backendOptionsObj ,
98- frontendOptionsObj ,
99- 'pyOutputPane' ,
100- optFinishSuccessfulExecution , handleUncaughtExceptionFunc ) ;
95+ executeUserCode ( pyInputGetValue ( ) ,
96+ backend_script , backendOptionsObj ,
97+ frontendOptionsObj ,
98+ 'pyOutputPane' ,
99+ optFinishSuccessfulExecution , handleUncaughtExceptionFunc ) ;
101100}
102101
103102
0 commit comments