The Real Python Podcast

Run Python in a Browser With Pyodide & The Power of f-Strings


Listen Later

Have you heard about the projects working toward getting Python to run in the browser? Maybe you would like to try it out for yourself, by building an interactive Python REPL with Pyodide and WebAssembly (WASM). This week on the show, Christopher Trudeau is here, and he’s brought another batch of PyCoder’s Weekly articles and projects.

We talk about a step-by-step project that shows you how to build a Python code editor in the browser using WebAssembly through Pyodide and CodeMirror. You’re going to be hearing a lot about Pyodide in the coming months, and here’s a chance for you to play around while building a small project.

Christopher shares an article about the power of Python f-strings. It covers some lesser-known features like variable debugging, nesting, and detailed formatting.

We also have a couple of topics up for discussion this week. They’re both related to finding work as a Python developer.

We cover several other articles and projects from the Python community, including the 2038 date problem, a primer about Python virtual environments, how to build a site connectivity checker in Python, a free book on digital signal processing in Python, and a project to build a voice-activated, password-protected wooden box.

Spotlight: Using Python’s datetime Module

Have you ever wondered about working with dates and times in Python? In this video course, you’ll learn all about the built-in Python datetime library. You’ll also learn about how to manage time zones and daylight saving time, and how to do accurate arithmetic on dates and times.

Topics:

  • 00:00:00 – Introduction
  • 00:02:38 – 2038 Date Problem
  • 00:07:46 – Python Virtual Environments: A Primer
  • 00:16:06 – Python f-Strings Are More Powerful Than You Might Think
  • 00:20:19 – Sponsor: CData Software
  • 00:21:01 – Build an Editor in Python and WebAssembly
  • 00:28:19 – Build a Site Connectivity Checker in Python
  • 00:30:21 – What Jobs Can I Have Knowing Python?
  • 00:39:53 – Video Course Spotlight
  • 00:41:12 – Projects for a Self-Taught Dev to Help Get a Job?
  • 00:50:46 – ThinkDSP: Free Book on Digital Signal Processing in Python
  • 00:53:14 – Durin’s Box: Voice-Activated, Password-Protected Wooden Box
  • 00:55:05 – Thanks and goodbye
  • Topic Links:

    • 2038 Date Problem (Funny, but True) – Coders old enough to remember Y2K are already dreading 2038. Join the conversation.
    • Python Virtual Environments: A Primer – In this tutorial, you’ll learn how to use a Python virtual environment to manage your Python projects. You’ll also dive deep into the structure of virtual environments built using the venv module, as well as the reasoning behind using virtual environments.
    • Python f-Strings Are More Powerful Than You Might Think – Learn about the lesser-known features of Python’s f-strings, including date formatting, variable debugging, nested f-strings, and conditional formatting.
    • Build an Editor in Python and WebAssembly – Step-by-step instructions on how to build a code editor in the browser using Python and WebAssembly (WASM), via Pyodide and CodeMirror.
    • Build a Site Connectivity Checker in Python – In this step-by-step project, you’ll build a Python site connectivity checker for the command line. While building this app, you’ll integrate knowledge related to making HTTP requests with standard-library tools, creating command-line interfaces, and managing concurrency with asyncio and aiohttp.
    • Discussions:

      • What Jobs Can I Have Knowing Python?
      • Projects for a Self-Taught Dev to Help Get a Job?
      • Projects:

        • ThinkDSP: Free Book on Digital Signal Processing in Python
        • Durin’s Box: Voice Activated, Password Protected, Wooden Box
        • Additional Links:

          • Tushar Sadhwani on Twitter: Add this to bash profile - export PIP_REQUIRE_VIRTUALENV=true
          • Python 3’s f-Strings: An Improved String Formatting Syntax – Real Python
          • A Guide to the Newer Python String Format Techniques – Real Python
          • Cool New Features in Python 3.8 – Real Python
          • “Why I Hate Frameworks”, Benji Smith (The Joel on Software Discussion Group)
          • What are the top 10 job skills for the future? | World Economic Forum
          • PyCoder’s Weekly | A Weekly Python E-Mail Newsletter
          • Level up your Python skills with our expert-led courses:

            • Using Python's datetime Module
            • Python 3's F-Strings: An Improved String Formatting Syntax
            • Formatting Python Strings
            • Support the podcast & join our community of Pythonistas

              ...more
              View all episodesView all episodes
              Download on the App Store

              The Real Python PodcastBy Real Python

              • 4.7
              • 4.7
              • 4.7
              • 4.7
              • 4.7

              4.7

              139 ratings


              More shows like The Real Python Podcast

              View all
              The Changelog: Software Development, Open Source by Changelog Media

              The Changelog: Software Development, Open Source

              288 Listeners

              Software Engineering Daily by Software Engineering Daily

              Software Engineering Daily

              625 Listeners

              Talk Python To Me by Michael Kennedy

              Talk Python To Me

              581 Listeners

              Soft Skills Engineering by Jamison Dance and Dave Smith

              Soft Skills Engineering

              289 Listeners

              Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

              Super Data Science: ML & AI Podcast with Jon Krohn

              302 Listeners

              Python Bytes by Michael Kennedy and Brian Okken

              Python Bytes

              213 Listeners

              Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

              Syntax - Tasty Web Development Treats

              988 Listeners

              Darknet Diaries by Jack Rhysider

              Darknet Diaries

              8,091 Listeners

              Tech Brew Ride Home by Morning Brew

              Tech Brew Ride Home

              969 Listeners

              Practical AI by Practical AI LLC

              Practical AI

              200 Listeners

              AWS Podcast by Amazon Web Services

              AWS Podcast

              206 Listeners

              Django Chat by William Vincent and Carlton Gibson

              Django Chat

              75 Listeners

              Last Week in AI by Skynet Today

              Last Week in AI

              309 Listeners

              Machine Learning Street Talk (MLST) by Machine Learning Street Talk (MLST)

              Machine Learning Street Talk (MLST)

              99 Listeners

              The Pragmatic Engineer by Gergely Orosz

              The Pragmatic Engineer

              69 Listeners