Change the file extension of your file from .py to .pyw .
See Using the Python Interpreter :
2.2.2. Python Executable Scripts
The Python installer automatically associates .py files with python.exe so that double-clicking on the Python file starts it as a script. The extension can also be .pyw , in which case the console window that usually appears is suppressed.
sloth source share