File tree 2 files changed +1
-23
lines changed 2 files changed +1
-23
lines changed Original file line number Diff line number Diff line change 2
2
import Tailwind from ' ./Tailwind.svelte' ;
3
3
import { loadInterpreter } from ' ./interpreter' ;
4
4
import {
5
- componentsNavOpen ,
6
5
initializers ,
7
6
loadedEnvironments ,
8
7
mode ,
15
14
let iconSize = 2 ;
16
15
let pyodideReadyPromise;
17
16
18
- function bumpSize(evt ) {
19
- iconSize = 4 ;
20
- }
21
-
22
- function downSize(evt ) {
23
- iconSize = 2 ;
24
- }
25
-
26
17
const initializePyodide = async () => {
27
18
pyodideReadyPromise = loadInterpreter ();
28
19
let newEnv = {
36
27
});
37
28
38
29
let showNavBar = false ;
39
- let main = document .querySelector (' #main' );
40
30
navBarOpen .subscribe (value => {
41
31
showNavBar = value ;
42
32
});
61
51
}
62
52
}, 3000 );
63
53
};
64
-
65
- function toggleComponentsNavBar(evt ) {
66
- componentsNavOpen .set (! $componentsNavOpen );
67
- }
68
54
</script >
69
55
70
56
<svelte:head >
Original file line number Diff line number Diff line change @@ -413,6 +413,7 @@ output_manager = OutputManager()
413
413
414
414
const loadInterpreter = async function ( ) : Promise < any > {
415
415
console . log ( 'creating pyodide runtime' ) ;
416
+ // @ts -ignore
416
417
pyodide = await loadPyodide ( {
417
418
stdout : console . log ,
418
419
stderr : console . log ,
@@ -422,15 +423,6 @@ const loadInterpreter = async function (): Promise<any> {
422
423
console . log ( 'loading micropip' ) ;
423
424
await pyodide . loadPackage ( 'micropip' ) ;
424
425
console . log ( 'loading pyscript module' ) ;
425
- // await pyodide.runPythonAsync(`
426
- // from pyodide.http import pyfetch
427
- // response = await pyfetch("/build/pyscript.py")
428
- // with open("pyscript.py", "wb") as f:
429
- // content = await response.bytes()
430
- // print(content)
431
- // f.write(content)
432
- // `)
433
- // let pkg = pyodide.pyimport("pyscript");
434
426
435
427
console . log ( 'creating additional definitions' ) ;
436
428
const output = pyodide . runPython ( additional_definitions ) ;
You can’t perform that action at this time.
0 commit comments