#!/usr/bin/python3 GPIO60 = "/sys/class/gpio/gpio60/" def writeVal(path, direction, value): fop = open(path + "direction", "w") fop.write(direction) fop.close() fov = open(path + "value", "w") fov.write(value) fov.close() return writeVal(GPIO60, "out", "1")