Skip to content

Commit b94bd82

Browse files
authored
Merge pull request #889 from live-codes/cleanup-python-wasm
clean up python-wasm script
2 parents 9295076 + c8dec77 commit b94bd82

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

src/livecodes/languages/python-wasm/lang-python-wasm-script.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable no-underscore-dangle */
2-
import { fontAwesomeUrl, pyodideBaseUrl } from '../../vendors';
2+
import { pyodideBaseUrl } from '../../vendors';
33

44
declare 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 = `
6155
from js import prompt
6256
def 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

Comments
 (0)