def filter_pathname(val):
 return os.path.splitext(os.path.basename((val or u'')))[0]

def filter_pathname ( val ) : return os . path . splitext ( os . path . basename ( ( val or u'' ) ) ) [ 0 ]
base name of a path .