The Real Python Podcast

Digging Into PyScript & Preventing or Handling Python Errors


Listen Later

Have you heard about PyScript? The brand-new framework has the community excited about building interactive Python applications that run entirely within the user’s browser. Would you like to dig into the details beyond the “Hello World” examples? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We talk about a Real Python tutorial from Bartosz Zaczyński about PyScript. The article provides an initial look at the framework and then takes you deep into the intricacies. We also share additional resources to help familiarize you with the project.

Christopher talks about another Real Python article, this one on how to approach managing errors in Python. The tutorial “LBYL vs EAFP: Preventing or Handling Errors in Python” is from frequent contributor Leodanis Pozo Ramos.

We cover several other articles and projects from the Python community, including discussing the PSF’s Python Developers Survey 2021 Results, Django static files and templates, how to profile Python code, a launcher for penetration testing, and a project for confirming Python versions through syntax errors.

Course Spotlight: Building a Django User Management System

In this video course, you’ll learn how to extend your Django application with a user management system, complete with email sending and third-party authentication.

Topics:

  • 00:00:00 – Introduction
  • 00:02:32 – LBYL vs EAFP: Preventing or Handling Errors in Python
  • 00:08:38 – How To Profile Python Code
  • 00:18:52 – Sponsor: CData Software
  • 00:19:35 – Django Static Files and Templates
  • 00:26:35 – A First Look at PyScript: Python in the Web Browser
  • 00:38:20 – Video Course Spotlight
  • 00:39:39 – Python Developers Survey 2021 Results
  • 00:48:19 – python-syntax-errors: Version-Specific No-Ops
  • 00:50:03 – arsenal: Inventory Launcher for Penetration Testing
  • 00:55:03 – Thanks and goodbye
  • Topics Links:

    • LBYL vs EAFP: Preventing or Handling Errors in Python – In this tutorial, you’ll learn about two popular coding styles in Python: look before you leap (LBYL) and easier to ask forgiveness than permission (EAFP). You can use these styles to deal with errors and exceptional situations in your code. You’ll dive into the LBYL vs EAFP discussion in Python.
    • How To Profile Python Code – No matter how good you are, sometimes your code just runs slowly. Learning how to properly profile your software to identify and fix bottlenecks is a useful skill. This article talks about what you need to know to measure your code’s performance and how to use the cProfile, profile, and timeit libraries, along with others.
    • Django Static Files and Templates – “Static files like CSS, JavaScript, and fonts are a core piece of any modern web application. They are also typically confusing for Django newcomers since Django provides tremendous flexibility around how these files are used. This tutorial will demonstrate current best practices for configuring static files in both local development and production.”
    • A First Look at PyScript: Python in the Web Browser – In this tutorial, you’ll learn about PyScript, a new framework that allows for running Python in the web browser with few or no code modifications and excellent performance. You’ll leverage browser APIs and JavaScript libraries to build rich, highly interactive web applications with Python.
    • Discussion:

      • Python Developers Survey 2021 Results | PSF
      • Python Developers Survey 2021 Results | JetBrains
      • Raw Data SurveyExport.csv | Google Drive
      • Projects:

        • python-syntax-errors: Version-Specific No-Ops
        • arsenal: Inventory Launcher for Penetration Testing
        • navi: An interactive cheatsheet tool for the command-line
        • eg: Useful examples at the command line.
        • Additional Links:

          • “Zero cost” exception handling · Issue #84403
          • Python 3.11 Preview: Task and Exception Groups | Real Python
          • PyCon US 2022 Keynote - Peter Wang - PyScript | YouTube
          • PyScript | Run Python in your HTML
          • pyscript: Getting started
          • pyscript: Pyscript examples
          • Python Timer Functions: Three Ways to Monitor Your Code | Real Python
          • Amdahl’s law | Wikipedia
          • Django Books | William Vincent
          • Django Chat
          • Episode #114: Getting Started in Python Cybersecurity and Forensics | The Real Python Podcast
          • Level up your Python skills with our expert-led courses:

            • Building a Django User Management System
            • How to Set Up a Django Project
            • Raising and Handling Python Exceptions
            • 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

              579 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,088 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

              207 Listeners

              Django Chat by William Vincent and Carlton Gibson

              Django Chat

              75 Listeners

              Last Week in AI by Skynet Today

              Last Week in AI

              310 Listeners

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

              Machine Learning Street Talk (MLST)

              100 Listeners

              The Pragmatic Engineer by Gergely Orosz

              The Pragmatic Engineer

              70 Listeners