SXXXXXXX_MarkdownConverter/run_markdownconverter.py
2025-12-03 10:07:33 +01:00

15 lines
541 B
Python

"""Bootstrap script used by PyInstaller to run the package as a module.
PyInstaller runs the specified script as __main__ when bundling. Running
`markdownconverter/__main__.py` directly causes relative imports to fail
because the module has no parent package. This small wrapper executes the
package using runpy.run_module so the package context is preserved.
"""
import runpy
if __name__ == "__main__":
# Run the package as a module so relative imports inside it work.
runpy.run_module("markdownconverter", run_name="__main__")