close


Sat 23 May 2026

Python Package - whereismyip

Posted by Al Sweigart in misc   

In August 2025, I created a Python package whereismyip to do simple geolocation based on IP address using free, no-registration online services. This blog post covers the package after a recent update. The source code is available in a git repo. and you can download it with pip or other tools from PyPI. If you are interested in this package, I also have a whatismyip Python package that finds your public IP address. You can also run python -m whereismyip to geolocate yourself (this requires whatismyip) or a specific IP address such as python -m whereismyip 8.8.8.8.

Read more...


Sat 23 May 2026

Python Package - whatismyip

Posted by Al Sweigart in misc   

Back in August 2020, I created a Python package whatismyip that can tell your Python script your public IP address using free, no-registration online services. This blog post covers the package after a recent update. The source code is available in a git repo. and you can download it with pip or other tools from PyPI. If you are interested in this package, I also have a whereismyip Python package that does geolocation based on IP address. To find out your IP address, run import whatismyip and call whatismyip.whatismyip() to return a string of the IPv4 or IPv6 address. There are additional functions for more specific requests. You can also run python -m whatismyip.

Read more...



Sat 23 May 2026

RimWorld Mod - MetaSteel

Posted by Al Sweigart in misc   

I generated a mod for RimWorld called MetaSteel that adds three tiered metals - MetaSteel, MetaMetaSteel, and MetaMetaMetaSteel - refined from raw Steel through a mysterious, labor-intensive forging process. Each tier doubles market value, max hit points, sharp/blunt/heat armor, cold insulation, and melee blunt/sharp damage over the prior. Crafted at a Fueled or Electric Smithy. Not stocked by traders. Each material is refined from 10 units of the previous tier, so while a steel longsword requires 100 steel to craft, a metametametasteel longsword requires 100,000 steel. The source code is in a git repo.. This mod was generated with Claude code.

Read more...


Sat 23 May 2026

RimWorld Mod - Helios Solar Generators

Posted by Al Sweigart in misc   

I generated a mod for RimWorld called Helios Solar Generators. I'm a fan of the SmallBench that shrink the sizes of various workbenches and the LWM's Deep Storage and Gravship Storage mods that let you fit more piles of items into tighter spaces. Helios Solar Generators adds four tiers of compact 2x2 solar generators, each unlocked by its own research project that builds on the previous tier. The source code is in a git repo.

Read more...


Thu 07 May 2026

Metropolis Shift - A Game for GUI Automation Bots

Posted by Al Sweigart in misc   

PLAY THE GAME ONLINE - I generated a single-page browser game inspired by the clock scene in Fritz Lang's Metropolis — a futile, attention-demanding job that never quite stays done. You must click the orange buttons to turn them all green, and re-click any buttons that turn orange. You gain points when they are ALL green, and lose points if ANY are orange. This game can be played by hand or it can be used to test GUI automation tools such as PyAutoGUI (as explained in the book, Automate the Boring Stuff with Python.) The project is based in a git repo. This app was generated with Claude Code.

Read more...


Thu 07 May 2026

The Simplest MCP Example Possible in Python

Posted by Al Sweigart in misc   

A large language models is, at its core, a giant blob of many billions or trillions of floating point numbers which generate text following an initial prompt. By themselves, they don't have access to clocks, calendars, web browsers, calculators, or Python interpreters. MCP (Model Context Protocol) is a standard for giving LLMs access to tools like these. This blog post has a basic example of how you can run an LLM on your local laptop (using Ollama) and give it access to the Python programs you write (using FastMCP). (This blog post assumes you have basic experience with Python, installing Python packages, and running commands on the terminal.)

Read more...


Mon 04 May 2026

Python Truth Table Generator

Posted by Al Sweigart in misc   

I used an LLM to make a teaching demonstration web app: enter a Python expression using Boolean operators and it shows you the complete truth table for it. For example, you can enter a and b and it shows you all four combinations. Or you can enter ((a or b) and (c or d)) and not (a and d) and it shows you all 16 combinations. It also works offline, so you can save the .html file and use it anywhere. Explore it here: Python Truth Table Generator

Read more...