How to replace these paths with Python? I have some objects, linked from other blend-files. I want to get access to their paths in Python, but I can't understand, how to find this data. Any ideas?
These linked files are in:
bpy.data.libraries

You can have their filepath with for instance:
[lib.filepath for lib in bpy.data.libraries]

The path is relative to the current blend file, so you can have absolute path with:
[bpy.path.abspath(lib.filepath) for lib in bpy.data.libraries]

In the documentation:

Libraries
Path utilities