def remove_mo_files():
 for (root, dirs, files) in os.walk(MO_DIR, topdown=False):
  for f in files:
   if (not f.startswith(DOMAIN)):
    os.remove(os.path.join(root, f))

def remove_mo_files ( ) : for ( root , dirs , files ) in os . walk ( MO_DIR , topdown = False ) : for f in files : if ( not f . startswith ( DOMAIN ) ) : os . remove ( os . path . join ( root , f ) )
remove mo files in locale .