Skip to content

Pyscript in iframe (serverless) #2029

Closed Answered by JeffersGlass
nvdid asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure if it's a bug or not, but using a py-config tag instead of an inline config does cure the symptoms:

const myHtml = `
<html lang="en"><head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>PyScript Offline</title>
  
  <link rel="stylesheet" href="https://pyscript.net/releases/2024.4.1/core.css">
  <script type="module" src="https://pyscript.net/releases/2024.4.1/core.js"></script>

</head>
<body>

<py-config>
  [js_modules.main]
  "http://localhost:5502/pyscript.core/test/commonpy.js" = "commonpy"
</py-config>

<script type="py">
	from pyscript.js_modules import commonpy
	commonpy.print('test 1')
	import sys
	from pys…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@WebReflection
Comment options

@nvdid
Comment options

@WebReflection
Comment options

@nvdid
Comment options

Answer selected by nvdid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants