@command('reverse\\s*(\\d{1,4})\\s*-\\s*(\\d{1,4})\\s*')
def reverse_songs_range(lower, upper):
 (lower, upper) = (int(lower), int(upper))
 if (lower > upper):
  (lower, upper) = (upper, lower)
 g.model.songs[(lower - 1):upper] = reversed(g.model.songs[(lower - 1):upper])
 g.message = (((((c.y + 'Reversed range: ') + str(lower)) + '-') + str(upper)) + c.w)
 g.content = content.generate_songlist_display()

@ command ( 'reverse\\s*(\\d{1,4})\\s*-\\s*(\\d{1,4})\\s*' ) def reverse_songs_range ( lower , upper ) : ( lower , upper ) = ( int ( lower ) , int ( upper ) ) if ( lower > upper ) : ( lower , upper ) = ( upper , lower ) g . model . songs [ ( lower - 1 ) : upper ] = reversed ( g . model . songs [ ( lower - 1 ) : upper ] ) g . message = ( ( ( ( ( c . y + 'Reversed range: ' ) + str ( lower ) ) + '-' ) + str ( upper ) ) + c . w ) g . content = content . generate_songlist_display ( )
reverse the songs within a specified range .