Python program is running even after the files are removed
As long as one process has a file open, the file will remain available to that process. No other processes can open it, and its existence will not be visible with normal OS utilities, such as ls.
In the case of Python, I think that the compiled version of the script remains in memory. Removing it from the filesystem does nothing to change that.
So your flask app is not affected until it terminates, at which point the resident memory will be freed and any files that it held open will be removed by the OS.
It should sound stupid. But here is my scenario. 
I have a python-flask website which is made live using nohup. Now even after i removed all files in __pycache__ and the original .py files the program is still running without any errors. So where does it run from ? Is there any cache of files getting created anywhere else?
Note: I know i can kill the process but just wanted to know about this issue