What do you mean a path/curve? How do you want to use this curve later? Sounds like you’re trying to record player/object motion?
Curves are basically a list of points with tangent information (bezier curves). Digging into how these curves are built, stored and accessed could be hard so IMO the best way to get a curve representing that is to abandon the idea of using BGE predefined curves. Instead record object motion path by storing the object.worldPosition and object.worldOrientation at regular interval and use that to compose a list you can later use as you want.