@command('(open|view)\\s*(\\d{1,4})')
def open_view_bynum(action, num):
 srt = sorted(g.userpl)
 name = srt[(int(num) - 1)]
 open_save_view(action, name)

@ command ( '(open|view)\\s*(\\d{1,4})' ) def open_view_bynum ( action , num ) : srt = sorted ( g . userpl ) name = srt [ ( int ( num ) - 1 ) ] open_save_view ( action , name )
open or view a saved playlist by number .