'What happens if a running Python module gets removed?

I've got code that I don't really want the user to see, for personal reasons.

I've also got a webserver with some python file (say, "secretFile.py", for example)

What would happen if I download secretFile.py to the CWD at the beginning of the file, import it as a module, and then use Python to immediately delete it? Would the code still run, or would it except and crash?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source