Skip to main content

🐍

The environment in which you install this package will permit you to use ".🐍" in addition to the usual ".py" extension.

Caveat emptor

Deviating from long-standing conventions is a recipe for pain and annoyance.

The less traveled path can be fun though! And that is what this silly package is about.

How it works

Besides package metadata, this package simply adds the two files below to the "site-packages" directory in which you install it.

  1. ./ext/snake/__init__.py: appends ".🐍" to the list of file extensions recognized by importlib.
  2. ./_ext-snake.pth: directs a Python interpreter using the package directory to load ext.snake before pretty much anything else.

It's really that simple.

For more fun

Add an alias to the configuration of your favorite shell to alias the python command to 🐍 too!

Running Python scripts would then look similar to the following.

# Without ext-snake
$ python my_script.py

# With ext-snake
$ 🐍 my_script.🐍

I typically run my Python code as a module (e.g. python -m my_module). I configured 🐍 to map to python -m on my system.

# Without ext-snake
$ python -m my_module

# With ext-snake
$ 🐍 my_module

Customization

I will ignore any request to modify this package for other file extensions. If you want a different emoji (e.g. 💰), you can replicate the approach to your own whim in minutes.

Metadata

Release files for ext-snake 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ext-snake 1.0.0
File Size Uploaded
ext_snake-1.0.0.tar.gz 2.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ext-snake 1.0.0
File Interpreter ABI Platform
ext_snake-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.2 kB

Release files / ext_snake-1.0.0.tar.gz

Download URL ext_snake-1.0.0.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bd9075de6d85534aa0ebf30648ebbd5dd8ae48de46219370535dd885c368e755
BLAKE2b-256 checksum
How to use checksums
3a7d93254e4f148e9ffc22787b589c4001d709df258e9e3b9d825bddcae732ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.26

Release files / ext_snake-1.0.0-py3-none-any.whl

Download URL ext_snake-1.0.0-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9860a597f3afce9e694929eebc0a74fc78a95c819bf798a163ed2e875c80ad81
BLAKE2b-256 checksum
How to use checksums
ad631843986009dbe35a40fbad6753d5419bef4a3413d4c206310317db0435ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.26

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page