With KiCommand, you can get the center positions with the following command:
modules GetCenter call print
Edit to add: the new KiCommand makes it easy to use KiCommand within python. By default the kicommand.run(commandstring) function returns the top of the stack, so you would get, in this case, a list of the center wxPoints of the modules. So you can run:
kicommand.run("modules GetCenter call")
In python after import kicommand.