This week we welcome Jeffrey Glass (@JeffersGlass) as our PyDev of the Week! Jeffrey is the maintainer of PyScript. PyScript is a framework that allows users to create rich Python applications in the browser using HTML’s interface and the power of Pyodide, WASM, and modern web technologies.
Let’s spend some time getting to know Jeff better!
Can you tell us a little about yourself (hobbies, education, etc):
I grew up in Silicon Valley in California, but moved to Chicago for college many years ago; I received a BA in Theatre with a Mathematics Minor at Northwestern university. I spent the first ten years of my career in live theatre, managing lighting, video, and special effects. Presently, I’m an exhibit engineer for a science museum, building and repairing interactive exhibits.
Outside of software, I hold an Extra Class amateur radio license, and am fairly conversant in morse code – I enjoy getting out into our state parks and throwing an antenna wire in a tree. I enjoy 3D printing, and I have a collection of interesting Salts from around the world.
Why did you start using Python?
I’ve been coding as a hobby and part of my profession since middle school, when I set up a QBasic program on my geometry teacher’s computer to play spurious beeps and bloops in the middle of class. The rapidity and friendliness of that coding experience is something I didn’t find again till I came to Python.
Python is the language that most feels like it gets out of the way, and lets the developer get on with the hard part of writing software: the thinking. In my career and hobby time, I need programs which come together fast, that are readable and debuggable, and that I stand a chance of understanding when I come back to them in a year. Python is the best candidate for that so far.
What other programming languages do you know and which is your favorite?
My favorite of those is probably TypeScript – the expressive type system is a real speed multiplier.
What projects are you working on now?
In addition to working on PyScript and its community, I’m developing Emshell, an in-browser shell for programs that use the Emscripten file system.
Which Python libraries are your favorite (core or 3rd party)?
From the standard library, difflib is great; I use it to help generate change-reports in different kinds of data or code, often with the ast package. I spend a lot of time with asyncio as well, as a consequence of living in the largely-single-threaded world of the browser.
For 3rd party libraries, I love Rich and Textual, the terminal-formatting and TUI libraries. Pytest is killer too – I’m always discovering a new option or plugin that makes it even more versatile. Pytest + Playwright is our main setup for PyScript.
What are your top three favorite things you like about PyScript?
What are some of the coolest things you’ve seen that were created with PyScript?
Here’s a really simple example. We had an English Teacher come through our Discord with an issue: when teachers in his district took a class for mandatory training hours, they needed to provide their supervisors with a physical certificate with the details, but trainers weren’t expecting to provide physical handouts in 2023. The teacher created a site with PyScript where users could enter their information, and it would generate a downloadable, official-looking PDF as required.
What’s neat is that, since PyScript is statically hostable, the whole page could sit on GitHub pages, or I think eventually just as an HTML file on their school server. It was easy for the teacher to write because it’s all Python, and it’s easy to deploy because it’s PyScript. That’s an awesome synergy.
Is there anything else you’d like to say?
There’s no such thing as a dumb question, especially on an Open Source project. If you’re a user and you have a question, it’s perfectly alright to ask it in a GitHub discussion/forum/Discord channel etc. Even if it turns out there’s a simple answer, just hearing the question helps us devs know something could be improved – maybe the documentation is unclear or hidden or out of date, maybe we need more prominent examples, etc.
Thanks for doing the interview, Jeffrey!