Add '.🐍' possible extensions.
Project description
🐍
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ext_snake-1.0.0.tar.gz.
File metadata
- Download URL: ext_snake-1.0.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd9075de6d85534aa0ebf30648ebbd5dd8ae48de46219370535dd885c368e755
|
|
| MD5 |
ba4714d340f914e6aa6fc7a1e2513826
|
|
| BLAKE2b-256 |
3a7d93254e4f148e9ffc22787b589c4001d709df258e9e3b9d825bddcae732ce
|
File details
Details for the file ext_snake-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ext_snake-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9860a597f3afce9e694929eebc0a74fc78a95c819bf798a163ed2e875c80ad81
|
|
| MD5 |
4f27e39682b6718c4f11ca01d3bf2871
|
|
| BLAKE2b-256 |
ad631843986009dbe35a40fbad6753d5419bef4a3413d4c206310317db0435ed
|