Episode 115: Digging Into PyScript & Preventing or Handling Python Errors
Jun 24, 2022 56m
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.
- 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
- 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,
timeitlibraries, along with others.
- Python Developers Survey 2021 Results | PSF
- Python Developers Survey 2021 Results | JetBrains
- Raw Data SurveyExport.csv | Google Drive
- 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.
- “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