In case you have imagemagick installed, you may see a strange behavior: executing a python script overwrites your data without notice. This effect is due to the command line application import of imagemagick. When you pipe data to a python script the first command of which is import foobar you will loose the file foobar in your current directory as this is the default target for the application mentioned above. So double-check the existence of your shebang #!/usr/bin/env python, as otherwise the whole file is interpreted by your shell.