MCPcopy Create free account
hub / github.com/SplootCode/splootcode / run

Function run

packages/runtime-python/src/webworker.ts:186–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184`
185
186const run = async () => {
187 try {
188 // Set up environment variables.
189 // This is a bit hacky but pyodide's API doesn't give us access to environment variables.
190 const globals = pyodide.toPy({ envVars: pyodide.toPy(envVars) })
191 await pyodide.runPython(EnvVarCode, {
192 globals: globals,
193 })
194
195 await pyodide.runPython(executorCode)
196 } catch (err) {
197 sendMessage({
198 type: 'stderr',
199 stderr: err.toString(),
200 })
201 }
202 sendMessage({
203 type: 'finished',
204 })
205}
206
207const generateTextContent = async (returnToEditor: boolean) => {
208 try {

Callers 1

webworker.tsFile · 0.85

Calls 1

sendMessageFunction · 0.70

Tested by

no test coverage detected