python – Managing configs to use scripts on different computers

I have some python scripts to run on different computers. To avoid struggles with different paths and filenames I made specific config-files (DConfig, AConfig and MConfig) and another script that decides which config to use. It works, but I guess, there are better ways to do this. Any ideas?

import os
import socket

hostname_K = 'DESKTOP-K'
hostname_A = 'A'
hostname_M = ''                    # hostname not known for sure

print("start config")
print("cwd: ", os.getcwd())
print("os: ",
# print(os.getlogin())                # Doesn't work on non-posix

hostname = socket.gethostname()
if hostname == hostname_K:
    import DConfig as Conf
elif hostname == hostname_A:
    import AConfig as Conf
    print("Hostname: {}, guess we are on M".format(hostname))
    import MConfig as Conf

dirData = Conf.dirData
dirScript = Conf.dirScript
pathDB = Conf.pathDB

print("config done.")