A python enigma

A guy wrote a script to get the size of his files. Once finished he typed :wq! and ran its script:

chmod +x fileweight.py

Then nothing happened… Unless his cursor became a cross. He tried to get his cursor back by clicking everywhere. He couldn’t get what was going on. The only new things he could see were two files named os and sys in his directory.