diff --git a/dymo_bluetooth/__main__.py b/dymo_bluetooth/__main__.py index ea36a1d..e71194f 100644 --- a/dymo_bluetooth/__main__.py +++ b/dymo_bluetooth/__main__.py @@ -26,6 +26,7 @@ from typing import cast from dymo_bluetooth.bluetooth import discover_printers, create_image import sys import asyncio +import os async def print_image( input_file : Path, @@ -46,7 +47,7 @@ async def print_image( def main(): - module_name = cast(str, sys.modules[__name__].__file__).split("/")[-2] + module_name = cast(str, sys.modules[__name__].__file__).split(os.sep)[-2] args = ArgumentParser( prog = f"python -m {module_name}", description = ( @@ -75,4 +76,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main()