def _syspath(dev):
 dev = _devbase(dev)
 dev = re.sub('^([vhs][a-z]+)([0-9]+)', '\\1/\\1\\2', dev)
 return os.path.join('/sys/block/', dev)

def _syspath ( dev ) : dev = _devbase ( dev ) dev = re . sub ( '^([vhs][a-z]+)([0-9]+)' , '\\1/\\1\\2' , dev ) return os . path . join ( '/sys/block/' , dev )
full sysfs path of a device .