def is_present(name):
 output = Popen(['locale', '-a'], stdout=PIPE).communicate()[0]
 return any(((fix_case(name) == fix_case(line)) for line in output.splitlines()))

def is_present ( name ) : output = Popen ( [ 'locale' , '-a' ] , stdout = PIPE ) . communicate ( ) [ 0 ] return any ( ( ( fix_case ( name ) == fix_case ( line ) ) for line in output . splitlines ( ) ) )
checks if the given locale is currently installed .