Skip to main content

regex-as-re-globally

This package does very unusual things, and you normally don't need it. It helps you use the "regex" package which is a backwards-compatible replacement for re, with additional features and better performance in some situations (and worse performance in others). Normally you can put import regex as re in your .py files and that's all you need.

However, if you want to use regex instead of re across your whole environment, even within 3rd-party libraries, then this package is for you.

Run pip install regex-as-re-globally to install this package. It will create a .pth file in site-packages which modifies sys.modules so that regex is used everywhere instead of re. This changes behavior within the whole python environment.

The wheel files generated are platform and python specific due to the limitations of wheel files, where the relative directory for site-packages needs to be determined at wheel building time, not install time. The directory is dependent on the version of python and the platform you are on.

The site-packages .pth technique is heavily inspired by https://github.com/dougn/coverage_pth and https://nedbatchelder.com/blog/201001/running_code_at_python_startup.html Thanks!

Release files for regex-as-re-globally 0.0.6

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

Source distribution (sdist)

Source distribution for regex-as-re-globally 0.0.6
File Size Uploaded
regex_as_re_globally-0.0.6.tar.gz 3.8 kB Details

Release files / regex_as_re_globally-0.0.6.tar.gz

Download URL regex_as_re_globally-0.0.6.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
13e0f984a3a63b64fb8b1e569a1a5a6900fcf20fac291181b3d42b373cbdf944
BLAKE2b-256 checksum
How to use checksums
63f80a198e097c2bcf66df1173ab2d02222088b8559e2a1f3422bc777b34fce5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.0.6 This release

1 release file

0.0.5

1 release file

0.0.4

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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