Skip to main content

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.

  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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ext_snake-1.0.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ext_snake-1.0.0-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

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

Hashes for ext_snake-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bd9075de6d85534aa0ebf30648ebbd5dd8ae48de46219370535dd885c368e755
MD5 ba4714d340f914e6aa6fc7a1e2513826
BLAKE2b-256 3a7d93254e4f148e9ffc22787b589c4001d709df258e9e3b9d825bddcae732ce

See more details on using hashes here.

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

Hashes for ext_snake-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9860a597f3afce9e694929eebc0a74fc78a95c819bf798a163ed2e875c80ad81
MD5 4f27e39682b6718c4f11ca01d3bf2871
BLAKE2b-256 ad631843986009dbe35a40fbad6753d5419bef4a3413d4c206310317db0435ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page