Sometimes doing the most simple tasks with Python can be challenging. Launching *.exe files with Python is a problem I encountered recently.
Imagine a file, such as C:/hello/hello.exe. The simplest way to launch this is:
import os
os.system("start C:/hello/hello.exe");
This is a great and simple method. But what if the directory has a space in it? Spoiler: It won't work. But there is a workaround. Open up command prompt and try the following
mklink /j <link> <folder>
Let's say you want to execute C:/hello hello/hello.exe from python. You could do this:
mklink /j c:\hello2 "c:\hello hello"
This means that now c:/hello2 be EQUIVALENT to "c:/hello hello", meaning that the file "c:/hello hello/hello.exe" can be executed by: