Skip to content
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

Removal of import pyp5js from transcrypt sketches #176

Closed
3 tasks done
berinhard opened this issue Sep 11, 2021 · 0 comments · Fixed by #183
Closed
3 tasks done

Removal of import pyp5js from transcrypt sketches #176

berinhard opened this issue Sep 11, 2021 · 0 comments · Fixed by #183

Comments

@berinhard
Copy link
Owner

berinhard commented Sep 11, 2021

The PR #175 refactored the base transcrypt/python files by moving them from the project's root directory to transcrypt's templates one (commit 0c29599). But there are further changes to make pyp5js internal API more consistent independently of the interpreter that's being used to render the sketch.

Currently, pyodide doesn't require the from pyp5js import * while transcrypt does. The idea of this issue is to remove this required import by updating transcrypt's target sketch to look more like pyodide's one. To do so, we'll have to update the target sketch file to, instead of importing the source sketch, inline the sketch code with all the other required code. The same way pyodide does here.

This will make it easier to reduce the duplication of the Python-p5js wrapper code.

checklist

  • Remove import
  • Recompile all transcrypt examples
  • New major versions
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 a pull request may close this issue.

1 participant