Simply put the last part in an extra file 'cachedata.py', then use import os os.spawnlp(os.P_NOWAIT, 'python', 'python', 'cachedata.py') to call this as child process and DON'T wait for this process. Ralph