From a2ae88322e38eb08def6b13ca06f14e148ad3ac3 Mon Sep 17 00:00:00 2001 From: Wei Ouyang Date: Fri, 17 May 2024 03:10:40 +0200 Subject: [PATCH] Fix help function --- public/chat/pyodide-worker.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/chat/pyodide-worker.js b/public/chat/pyodide-worker.js index fb70a723..08b58c18 100644 --- a/public/chat/pyodide-worker.js +++ b/public/chat/pyodide-worker.js @@ -236,6 +236,13 @@ async def run(source, io_context): except: traceback.print_exc() raise + +def help(): + return """Welcome to Python (Pyodide, WebAssembly)! +This code interperter is a Jupyter notebook-like environment, it support top-level await operations and the asyncio event loop is already running, so you can call "await func()" directly without wrapping in a async function or using asyncio.run. +The environment has access to remote servers, so you can fetch remote data by using python modules "requests" or "imjoy_rpc.hypha" for connect to the Hypha/BioEngine server. +User data will be mounted to the \`/mnt\` directory. Use "os.listdir('/mnt')" to explore available files before processing. +""" ` const mountedFs = {}