MagicalPython
MagicalPython — I originally wanted to call it Python++ :c
why?
/waɪ/ • adverb
Definition > For what reason, cause, or purpose; to what end. Used to question the motivation, justification, or necessity behind an action.
E.g.: "Why would you ever make that?"
I know what you are thinking: "Why would someone ever make this?" Well, the answer is "because I can." There are so many cautionary tales about the dangers of thinking about "why not" rather than "why" that nobody ever stops to actually think "I can make that, why shouldn't I?" I strive to change that.
That is why I made this monstrosity. Python with nearly everything nobody ever thought "why not!" about.
Features
Resulttype (you have to use it, literally every function will always return one).- Lazy errors (they don't raise immediately, but they can if you want them to).
- Rust's
?operator, except its a function calledq. - Fancy tracebacks.
- A fancy segfault message, for you Windows users out there.
- Inline assembly.
- Clobbers.
- Automatic ctype resolution.
- Introspection.
- Per-architecture and per-OS assembly.
- Memory stuff!
- Malloc & calloc.
- Automatic local/remote mode.
- Memory protection.
- C-style bitfields.
- Unions.
- Memory scanning, because we feel like a cheat written in this would be hilarious.
- AoB (Array of Bytes) scanning.
- Semi-automatic privilege escalation (via UAC on Windows or cached sudo creds on Linux/MacOS).
- CPU feature detection.
- Raw CPUID leaves, in case you want them.
- GCC-style
__builtins__. - Crash handler registration.
- Exit handler registration.
- Atomics (technically not atomic, but the only access to the memory you need an atomic for is within an atomic CPU instruction), so it counts.
- Spinlocks.
C Build Commands
Simply cd into the project root and run the Windows and then Linux/MacOS build commands, assuming you are on Windows.
Windows
gcc -shared -O2 -o src/native/segfault_msg.dll src/native/segfault_msg.c
Linux/MacOS
docker run --rm -v $"($env.PWD):/work" -w /work gcc:latest gcc -shared -fPIC -O2 -o src/native/segfault_msg.so src/native/segfault_msg.c
Metadata
Release files for magicalpython 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| magicalpython-0.2.2.tar.gz | 320.4 kB | Without provenance | Details for magicalpython-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| magicalpython-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for magicalpython-0.2.2-py3-none-any.whl |
Total release size: 393.1 kB
Release files / magicalpython-0.2.2.tar.gz
| Download URL | magicalpython-0.2.2.tar.gz |
|---|---|
| Size | 320.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e553f5d8006f82680b6bf0be5b01dc0f35b776dbb746b589973b51c08778d3d
|
|
BLAKE2b-256 checksum How to use checksums |
2784b0b2c28e3020113083aa3ef3fb895267cf5aed6f7c13964d5fd56500ae5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Release files / magicalpython-0.2.2-py3-none-any.whl
| Download URL | magicalpython-0.2.2-py3-none-any.whl |
|---|---|
| Size | 72.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b76d10a2260b7b330be9230d2fcd11ccc0ddd38e45649337961e8557ae09e90
|
|
BLAKE2b-256 checksum How to use checksums |
a2c4759174af6a04c9d17661aae1b98ddd0c32b457c488436c445a04b5247ff1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Security for magicalpython 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.