paths = glob.glob('/sys/bus/w1/devices/28-*')
path_names = [os.path.basename(path) for path in paths]
if len(path_names) > 0:
    first_sensor = os.path.normpath(os.path.join(path_names[0], 'w1_slave'))
while True:
    pass
Get a complete name of a directory in Python