MCPcopy Index your code
hub / github.com/RustPython/RustPython / main

Function main

wasm/demo/snippets/import_pypi.py:12–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11@asyncweb.main
12async def main():
13 await whlimport.load_package("pygments")
14 import pygments
15 import pygments.formatters.html
16 import pygments.lexers
17
18 lexer = pygments.lexers.get_lexer_by_name("python")
19 fmter = pygments.formatters.html.HtmlFormatter(noclasses=True, style="default")
20 print(pygments.highlight("print('hi, mom!')", lexer, fmter))

Callers

nothing calls this directly

Calls 2

load_packageMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected