🐍
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.
./ext/snake/__init__.py: appends ".🐍" to the list of file extensions recognized by importlib../_ext-snake.pth: directs a Python interpreter using the package directory to loadext.snakebefore 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)
| File | Size | Uploaded | |
|---|---|---|---|
| ext_snake-1.0.0.tar.gz | 2.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|