def validate_theme(theme):
 files = os.listdir((os.path.dirname(__file__) + '/colorset'))
 themes = [f.split('.')[0] for f in files if (f.split('.')[(-1)] == 'json')]
 return (theme in themes)

def validate_theme ( theme ) : files = os . listdir ( ( os . path . dirname ( __file__ ) + '/colorset' ) ) themes = [ f . split ( '.' ) [ 0 ] for f in files if ( f . split ( '.' ) [ ( - 1 ) ] == 'json' ) ] return ( theme in themes )
validate a theme exists or not .