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

Expose pyodide instance used by PyScript #494

Closed
3 tasks done
jim22k opened this issue Jun 2, 2022 · 0 comments · Fixed by #868
Closed
3 tasks done

Expose pyodide instance used by PyScript #494

jim22k opened this issue Jun 2, 2022 · 0 comments · Fixed by #868
Labels
needs-triage Issue needs triage type: feature New feature or request

Comments

@jim22k
Copy link

jim22k commented Jun 2, 2022

Checklist

  • I added a descriptive title
  • I searched for other feature requests and couldn't find a duplicate (including also the type-feature tag)
  • I confirmed that it's not related to another project are area (see the above section)

What is the idea?

Current state:

  • HTML file with PyScript tags and code
  • Javascript module which interacts directly with pyodide
  • loadPyodide in the Javascript file fails

Only a single instance of pyodide can exist and PyScript already created it. The Javascript file cannot get a handle to the pyodide instance because PyScript does not expose it.

Desired state:

  • Javascript can access the pyodide instance created by PyScript -or-
  • Javascript can create the pyodide instance and somehow give it to PyScript

The goal is for both pieces of code to use the same pyodide runtime. I know there is a mechanism coming in pyodide which will allow multiple runtimes (at 2x the cost). Hopefully that can be avoided by sharing the instance.

Why is this needed

No response

What should happen?

No response

Additional Context

No response

@jim22k jim22k added needs-triage Issue needs triage type: feature New feature or request labels Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issue needs triage type: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant