11/* eslint-disable no-underscore-dangle */
2- import { fontAwesomeUrl , pyodideBaseUrl } from '../../vendors' ;
2+ import { pyodideBaseUrl } from '../../vendors' ;
33
44declare const loadPyodide : any ;
55
@@ -50,21 +50,13 @@ window.addEventListener('load', async () => {
5050 }
5151
5252 async function prepareEnv ( ) {
53- // needed for matplotlib icons
54- const stylesheet = document . createElement ( 'link' ) ;
55- stylesheet . rel = 'stylesheet' ;
56- stylesheet . href = fontAwesomeUrl ;
57- document . head . append ( stylesheet ) ;
58-
5953 await pyodideReady ;
6054 const patchInput = `
6155from js import prompt
6256def input(p):
6357 return prompt(p)
6458__builtins__.input = input
6559` . trim ( ) ;
66- // in Pyodide v0.26.x runPythonAsync does not resolve in the following times
67- // use runPython instead
6860 await livecodes . pyodide . runPythonAsync ( patchInput ) ;
6961 }
7062
@@ -82,8 +74,6 @@ __builtins__.input = input
8274 try {
8375 await livecodes . micropip . install ( pkg ) ;
8476 } catch ( err ) {
85- // in Pyodide v0.26.x this needs to be done,
86- // otherwise the following micropip installs do not resolve
8777 // livecodes.excludedPackages.push(pkg);
8878 }
8979 }
@@ -96,8 +86,6 @@ __builtins__.input = input
9686 await loadPackagesInCode ( code ) ;
9787 try {
9888 livecodes . pyodideState = livecodes . pyodide . pyodide_py . _state . save_state ( ) ;
99- // in Pyodide v0.26.x runPythonAsync does not resolve in the following times
100- // use runPython instead
10189 await livecodes . pyodide . runPythonAsync ( code ) ;
10290 } catch ( err ) {
10391 // eslint-disable-next-line no-console
0 commit comments