def _devbase(dev):
 dev = os.path.realpath(os.path.expandvars(dev))
 dev = os.path.basename(dev)
 return dev

def _devbase ( dev ) : dev = os . path . realpath ( os . path . expandvars ( dev ) ) dev = os . path . basename ( dev ) return dev
basename of just about any dev .