Skip to main content

Python package made for better PIP access

Project description

Reincarnation: Code Immortality Engine

💥 THE PROBLEM: CODE IS DYING 💥

Python evolves and breaks the old. Libraries like pythonnet or modules like distutils become ghosts in the digital graveyard.

🚀 THE SOLUTION: REINCARNATION ENGINE 🚀

Reincarnation is digital resurrection for your legacy Python projects. It allows you to run outdated code on modern interpreters seamlessly.

FEATURES: THE NINE LIVES OF CODE

  • 🔮 Future Annotations: Uses from __future__ import annotations for lazy evaluation.
  • ⚙️ AST Transpilation: Rewrites old syntax (like print x) into modern calls (print(x)) on the fly.
  • 👻 Module Polyfills: Replaces removed modules (imp, distutils, Tkinter) with modern equivalents.
  • 🎭 Version Spoofing: Tricks libraries into thinking they run on older Python versions.
  • 🔗 Global Import Hook: Intercepts imports via sys.meta_path to provide resurrected modules.
  • 🌉 Byte/String Bridge: Handles Python 2-to-3 encoding issues transparently.
  • 🌐 Ghost Env: Virtual variables to satisfy legacy requirements.

🛠️ GETTING STARTED

  1. Install: pip install reincarnation

  2. The Ritual: Add this at the very beginning of your legacy script:

import reincarnation
reincarnation.enable_universal_resurrection() 

import tkinter 
import imp 
print 'Hello from the past!' 

⚡️ ADVANCED USAGE Define custom shims for specific variables:

import reincarnation
def my_modern_ref(dll): print(f"Linked: {dll}")

reincarnation.enable_resurrection(
    shims={"clr.AddReference": my_modern_ref}
)

🤝 CONTRIBUTING Contributions are welcome! Join us in building a more resilient software future.

📜 LICENSE Licensed under the MIT License.

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

reincarnation-1.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

reincarnation-1.1.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file reincarnation-1.1.1.tar.gz.

File metadata

  • Download URL: reincarnation-1.1.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for reincarnation-1.1.1.tar.gz
Algorithm Hash digest
SHA256 89e05ae3bcc352d79670f046a3fe3cf210900ba5c1bf89697c33efc60ca2b89e
MD5 ab2f369328ba99bbb56f840c8a566901
BLAKE2b-256 14125ea26d42330bd440e2be78402c71462657332b44b3d360f0048d03091c1d

See more details on using hashes here.

File details

Details for the file reincarnation-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: reincarnation-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for reincarnation-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e76d7e98b65690cbb34611d73c2df4361ce6894525e79f3209b6504b334c0380
MD5 5d7fd578354e4bb6cdfbf8acaca5bc53
BLAKE2b-256 f7cbd439da43775b9febe6091f6496162f6caab02f6f73c4a51a66a38f2f12bc

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