How to get the worldspace location of a rendered pixel from Python I need a way to find the underlying 3D coordinates for each pixel of the camera in Python.

I to create a function like:

GetCoordinatesForPixel(xPixel, yPixel)

which returns a (X, Y, Z) vector. 

I found the following threads:

How to get world coordinates of pixels?
which is supposed to be a duplicate of this one:
How to render world position pass

The latter solution works in that it procudes a render. However, I do not see a way to access those values in Python.
Blender's Python API currently doesn't expose access to the pixel value of render passes.

(You can access image pixels but renders's are a more complex structure).

However since you mention you need to store the values in a file, just save the OpenEXR file, this will store the values in a file.