def _parse_nav_steps(arg_str):
 COMMAND_ALIASES = [('LOGIN', _parse_login)]
 if (not arg_str):
  arg_str = ''
 words = arg_str.split(' ')
 for (name, callback) in COMMAND_ALIASES:
  if (words[0] == name):
   return callback(*words[1:])
 commands = arg_str.split('|')
 parsed_commands = reduce((lambda x, y: ((x + [y]) if y else x)), map(_parse_command, commands), [])
 runhandler = '_command_handler'
 return {'runhandler': runhandler, 'args': {'commands': parsed_commands}}

def _parse_nav_steps ( arg_str ) : COMMAND_ALIASES = [ ( 'LOGIN' , _parse_login ) ] if ( not arg_str ) : arg_str = '' words = arg_str . split ( ' ' ) for ( name , callback ) in COMMAND_ALIASES : if ( words [ 0 ] == name ) : return callback ( * words [ 1 : ] ) commands = arg_str . split ( '|' ) parsed_commands = reduce ( ( lambda x , y : ( ( x + [ y ] ) if y else x ) ) , map ( _parse_command , commands ) , [ ] ) runhandler = '_command_handler' return { 'runhandler' : runhandler , 'args' : { 'commands' : parsed_commands } }
heres how to specify the navigation steps: 1 .