AST Black Magic: Run synchronous Python code on asynchronous Pyodide – PyCon Taiwan 2025
PyCon Taiwan 2025|Day 1, R3 13:20–13:50 🪄 說明 Description 🪄 The `ast` module allows you to manipulate the AST (Abstract Syntax Tree) and change the behavior of the code at runtime. I would like to introduce it with an interesting use case on Pyodide, a Python distribution for the browser. Pyodide has some differences from the CPython due to its asynchronous nature, so the code that works on CPython may not work on Pyodide. For example, `time.sleep()` does not work on Pyodide and you need to use `await asyncio.sleep()` instead. However, you may want to run the code written for CPython on Pyodide for interoperability. In such a case, you can modify the AST to make it work on Pyodide without rewriting the source code. In this talk, I will explain the AST manipulation with the `ast` module. Then I will share some practical examples that I actually implemented in my Pyodide-based project to run CPython-targeted code. They should have insights about how to use the `ast` module to solve some problems with actual examples. Slides: https://slides.whitphx.info/202509-py... https://tw.pycon.org/2025/zh-hant/con... 🚀 講者介紹 About Speaker - Yuichiro Tachibana 🚀 Yuichiro is a professional software developer with a deep passion for open-source software. After contributing to software product development across several machine learning startups, he joined Hugging Face in 2023. He is developing and maintaining several OSS projects, including Stlite, Gradid-Lite, and Transformers.js.py. Follow “PyCon Taiwan” ⭐️ Official Website: https://tw.pycon.org ⭐️ Facebook: / pycontw ⭐️ Instagram: / pycontw ⭐️ Twitter: / pycontw ⭐️ LinkedIn: / pycontw ⭐️ Blogger: https://conf.python.tw/

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains

Transformers, the tech behind LLMs | Deep Learning Chapter 5

I Think They Are Lying To You

Software engineering at the tipping point

TokioConf 2026 - Async Rust Meets Async Python: How Daft runs... by Colin Ho, Srinivas Lade

Co-Creator of Haskell: Why Learn Functional Programming, Useless vs Useful Languages | Simon Jones

Why birth rates are falling everywhere all at once | FT

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

HW News - DRAM Companies Hit Trillions of Dollars, Bambu Open Source, NVIDIA Spark Concerns

How to stop an evil postman (ft. Amit Sahai)

When Animals Surprise Photographers in the Sweetest Way! 😍

Simple Code, High Performance

Inside Anthropic, the $965 Billion AI Juggernaut | The Circuit

Spanien – Kap Verde Highlights | Gruppe H, FIFA WM 2026 | sportstudio

NASAs Coding Requirements Are Insane

Apache Airflow: Synchronizing Datasets across Multiple instances – PyCon Taiwan 2025

How to Actually Learn C (2027 Edition)

Unbelievable Workers Compilation | Working with Talented Engineers #45 #adamrose #smartworkers

Introduction to async views in Django | async/await in Django views

