mpiexec -np 1 atkpython < test.py >> test.out
You are piping the file test.py into the standard input (stdin) of the atkpython program. That is not how atkpython (or normal python) works. Instead you should simply pass the script file as an argument to the atkpython program:
mpiexec -np 1 atkpython test.py >> test.out
You can see the expected way to run the program by executing atkpython --help