from subprocess import Popen
from win32process import DETACHED_PROCESS
pid = Popen(['C:\\python24\\python.exe', 'long_run.py'], creationflags=
    DETACHED_PROCESS, shell=True).pid
print(pid)
Python - Launch a Long Running Process from a Web App