8000 remove old code and bypass some warning by fpliger · Pull Request #59 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

remove old code and bypass some warning #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unused code in App
  • Loading branch information
fpliger committed Apr 28, 2022
commit 3f05d33ebc535370e458fef4e133a005c9da17d4
14 changes: 0 additions & 14 deletions pyscriptjs/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import Tailwind from './Tailwind.svelte';
import { loadInterpreter } from './interpreter';
import {
componentsNavOpen,
initializers,
loadedEnvironments,
mode,
Expand All @@ -15,14 +14,6 @@
let iconSize = 2;
let pyodideReadyPromise;

function bumpSize(evt) {
iconSize = 4;
}

function downSize(evt) {
iconSize = 2;
}

const initializePyodide = async () => {
pyodideReadyPromise = loadInterpreter();
let newEnv = {
Expand All @@ -36,7 +27,6 @@
});

let showNavBar = false;
let main = document.querySelector('#main');
navBarOpen.subscribe(value => {
showNavBar = value;
});
Expand All @@ -61,10 +51,6 @@
}
}, 3000);
};

function toggleComponentsNavBar(evt) {
componentsNavOpen.set(!$componentsNavOpen);
}
</script>

<svelte:head>
Expand Down
10 changes: 1 addition & 9 deletions pyscriptjs/src/interpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ output_manager = OutputManager()

const loadInterpreter = async function (): Promise<any> {
console.log('creating pyodide runtime');
// @ts-ignore
pyodide = await loadPyodide({
stdout: console.log,
stderr: console.log,
Expand All @@ -422,15 +423,6 @@ const loadInterpreter = async function (): Promise<any> {
console.log('loading micropip');
await pyodide.loadPackage('micropip');
console.log('loading pyscript module');
// await pyodide.runPythonAsync(`
// from pyodide.http import pyfetch
// response = await pyfetch("/build/pyscript.py")
// with open("pyscript.py", "wb") as f:
// content = await response.bytes()
// print(content)
// f.write(content)
// `)
// let pkg = pyodide.pyimport("pyscript");

console.log('creating additional definitions');
const output = pyodide.runPython(additional_definitions);
Expand Down
0