Thu 16 October 2025

ChatGPT 5 Can't Count

Posted by Al Sweigart in misc   

Computers can count. But ChatGPT 5, the latest and greatest model from OpenAI, one of the leading AI products available... doesn't count. I gave ChatGPT 5 several basic counting tasks and it failed nearly all of them: It can't generate an output of exactly 1,000 letter A's. It can't give me an accurate count when I give it 1,000 letter A's. It can't even get the same wrong count for letters other than A. AI companies have spent billions on AI that can't do something computers have been doing since the beginning of computing: Count.

Read more...


Tue 14 October 2025

ButtonPad: A Simple, Limited Python GUI Toolkit Built on Tkinter

Posted by Al Sweigart in misc   

I needed a simple way to create desktop apps with Python that didn't involve installing large GUI toolkits like PyQT or PySide, so I've created ButtonPad, a simple, intentionally-limited Python GUI framework for creating a grid of buttons, labels, text boxes, and images. I modeled them after the design of programmable stream deck or drum machine hardware. The source is on GitHub. It's built on top of tkinter, so it is lightweight and doesn't need additional GUI packages. Widget layout is done with a single comma-separated multiline string. No widget subclassing, no designer files, no sprawling boilerplate; just a layout string and some basic options. Still, I've made a surprising variety of simple apps with it which can all be run from the launcher program: python -m buttonpad

Read more...


Mon 13 October 2025

Al Sweigart's Opinionated Pelican Tutorial

Posted by Al Sweigart in misc   

This is an opinionated tutorial for the Pelican static blog generator. Writing a tutorial forces me to fill in all the gaps of my knowledge. The main reason I'm writing this tutorial is because I want to get a solid understanding of Pelican for making my website.

Read more...


Tue 30 September 2025

Python Violates PEP 8

Posted by Al Sweigart in misc   

Sweigart's Law of PEP 8 Complaints is: "Any time someone complains about source code violating PEP 8, they are always complaining that the source code uses camelCase instead of snake_case. The complaint is never about any other part of PEP 8." What is the point of Python Enhancement Proposal document number 8, and how does it get used and misused? Why do we write code the way we do, and how meaningful are conversations about code style and readability anyway?

Read more...


Mon 29 September 2025

Scroll Art Python Package

Posted by Al Sweigart in misc   

Scroll art is moving ASCII art produced by stdout text printed from a loop, animated as the text scrolls up the terminal. It's especially useful as creating computing projects for beginner programmers. Because it only uses text, no environment setup or additional libraries are needed and scroll art can be made in every programming language. I've published examples of scroll art on https://scrollart.org, but now I've also included Python implementations in the scrollart package, which you can install by running pip install scrollart and view with python -m scrollart --help.

Read more...


Fri 26 September 2025

Rock Paper Scissors Arena Simulation

Posted by Al Sweigart in misc   

As part of an AI-generated code experiment, I had ChatGPT 5 create a Rock Paper Scissors "arena simulator" where different emojis play a game of tag. Emoji converts the "prey" emoji that they catch. This idea follows the tradition of "spatial rock paper scissors" simulations, such as this Julia-language "agents" framework example. I did multiple attempts, but you can view one chat log here.. You can download the rpsarena package from PyPI and see the source code in its git repo. The rpsarena package uses tkinter and has no dependencies outside of the Python standard library. After installing, run python -m rpsarena --help to view instructions on how to set up a game.

Read more...


Mon 22 September 2025

Fractal Art Maker for Python Turtle.py

Posted by Al Sweigart in misc   

Fractals are beautiful, self-similar patterns that can be created by a computer from very simple rules. My Fractal Art Maker package makes it easy to use Python's turtle.py package to draw your own. You don't need to know recursion, but you can read my free book, The Recursive Book of Recursion if you're curious. If you want to learn how to draw pictures with Python code, I also have The Simple Turtle Tutorial.

Read more...


Thu 18 September 2025

Turtle Colors and RGB App

Posted by Al Sweigart in misc   

I've been working on turtle-related projects and I needed a simple, interactive, single-file Python program to explain RGB color values. I wrote this one up as part of my work writing a Simple Turtle Tutorial written in Wikipedia-style Simple English so it can be translated to non-English languages. You can download the app from PyPI and look at its code on its git repo

Read more...


Wed 17 September 2025

Automate the Boring Stuff Workbook Now Available for Preorder

Posted by Al Sweigart in misc   

"This workbook transforms Al Sweigart’s best-selling guide from a reading experience into a coding experience. Following Automate the Boring Stuff with Python chapter by chapter, this workbook will help you turn concepts into muscle memory through carefully designed exercises, projects, and real Python scripts."
Thumbnail cover of Automate the Boring Stuff with Python Workbook
Preorder links: Direct From the Publisher (preferred) | Amazon | Barnes and Noble | Bookshop.org | Powell's | Kobo | Thriftbooks | Goodreads

Read more...