I had the same problem from Access VBA. When I renamed my Python file from *.py to *.txt the python code was doing as expected.