Make test.py executable: chmod u+x test.py

Done so
./test.py
will work (rather than having to type "python test.py")