{"id":5706,"library":"pyth3","title":"Pyth3: Python Text Markup and Conversion","description":"Pyth3 (version 0.7) is an incomplete and unmaintained port of the Python 2 `pyth` library, intended for text markup and conversion between formats like RTF and XHTML. The project explicitly states that while some components were partially upgraded for Python 3, many parts, including tests, are known to be broken, and the library is primarily targeted at Python 2.7. The last release was in February 2019, indicating it is no longer actively developed.","status":"abandoned","version":"0.7","language":"en","source_language":"en","source_url":"http://github.com/prechelt/pyth","tags":["text processing","markup","conversion","python2-legacy","abandoned"],"install":[{"cmd":"pip install pyth3","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"note":"The top-level 'pyth3' module does not expose direct document objects; specific submodules for readers/writers are used. This path is inferred from common Python library structure and historical mentions of `pyth.document` in related discussions, but its functionality is highly questionable in `pyth3`.","wrong":"import pyth3","symbol":"PythDocument","correct":"from pyth.document import PythDocument"}],"quickstart":{"code":"import os\n\n# NOTE: This library is largely non-functional for Python 3 (as per its own PyPI description).\n# The following code demonstrates a hypothetical usage pattern based on the original Python 2 'pyth' library,\n# but is NOT expected to work with pyth3 version 0.7 due to its unmaintained and broken state.\n# Specific functionality like 'RTF15Reader' or 'XHTMLWriter' would be accessed via submodules.\n\ntry:\n    # In a fully functional library, you might import specific components like this:\n    # from pyth.plugins.rtf15.reader import RTF15Reader\n    # from pyth.plugins.xhtml.writer import XHTMLWriter\n\n    # For demonstration, a placeholder import structure\n    from pyth.document import PythDocument\n\n    # Attempting to create a document or process text would likely fail or not be supported.\n    print(\"Successfully attempted to import PythDocument (unlikely to be fully functional).\")\n    # Example: document = PythDocument.new_document()\n    # print(document)\nexcept ImportError as e:\n    print(f\"ImportError: {e}. This library is known to have significant issues with Python 3.\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}. The library is likely broken for modern Python.\")","lang":"python","description":"This quickstart illustrates a hypothetical import and usage pattern for `pyth3`, based on common Python library conventions and mentions from its Python 2 predecessor. However, it's crucial to understand that `pyth3` is explicitly stated by its maintainers as largely broken and unmaintained for Python 3. The provided code is therefore expected to fail or not function as intended, serving primarily as an example of *how* one might attempt to use such a library if it were functional."},"warnings":[{"fix":"Do not use `pyth3` for Python 3 projects. Seek alternative, actively maintained text markup and conversion libraries compatible with Python 3.","message":"The `pyth3` library, despite its name, is primarily a (partially and incompletely) ported Python 2 project. Its PyPI description explicitly states that 'Everything else is unknown (or definitely broken on Python 3: even many of the tests fail)'. It is not expected to work correctly with modern Python 3 versions.","severity":"breaking","affected_versions":"<=0.7"},{"fix":"Avoid using unmaintained libraries in new projects. Migrate existing projects to actively supported alternatives.","message":"The library is unmaintained, with its last release in February 2019. This means there will be no bug fixes, security updates, or compatibility improvements for newer Python versions or related libraries.","severity":"gotcha","affected_versions":"<=0.7"},{"fix":"Always check a library's full PyPI metadata, including classifiers and descriptions, to understand its true compatibility and maintenance status, especially when the name might be misleading.","message":"The PyPI classifiers list 'Programming Language :: Python :: 2.7', which contradicts the 'pyth3' name and the intention of being a Python 3 port. This highlights the foundational incompatibility and lack of proper Python 3 support.","severity":"gotcha","affected_versions":"<=0.7"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}