Right, that all looks fine, so the question is what goes wrong from the
Emacs side. What do you get from evaluating this in Emacs:
(call-process
"py" nil '(t t) nil
"-i" "t.py")
Does it make any difference if you use python-shell-with-environment?
(python-shell-with-environment
(call-process
"py" nil '(t t) nil
"-i" "t.py"))