Skip to content

Conversation

@James-h-1969
Copy link

Made it so that packages can be imported into the python code. Also made a note for users in the markdown - might want to make clearer? Basically just saying if they want packages to be available when they create their own pyodide instance with a custom folder path, that folder must contain the packages they want in a .whl file.

…in order to connect the editor with the packages that pyodide has available, also added loading packages and executing using loadPackagesFromImports(codeString), an inbuilt pyodide function
…rder to run the load package files. Change path back to local public directory
…er to add them (more description on how to in the README)
}
});

try{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code style: Needs space between try and opening curly brace

});

try{
// load from specific URL from Pyodide - if integrity issues check that correct version and correct URL
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code style: Capitalise first word of comments

// load from specific URL from Pyodide - if integrity issues check that correct version and correct URL
await pyodideInstance.loadPackagesFromImports(codeString);
} catch (e) {
let outputLine = e.message; // if fails do not run the code, output the error
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code style: Capitalise first word of comments

Copy link
Owner

@dillondesilva dillondesilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor styling issues but otherwises LGTM👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants