parameters: (run_num, ext)
return_statement: return run_spec, period
docstring: Extracts an (optional) period specification from the run_num
          and then adds the extension
          @param run_num: run number with optional period specified a after the letter 'p'
          @param ext: file extension
          @return: run specification (number.extension), period
docstring_summary: Extracts an (optional) period specification from the run_num
          and then adds the extension
docstring_tokens: Extracts an ( optional ) period specification from the run_num and then adds the extension
function: def parse_run(run_num, ext):
      """
          Extracts an (optional) period specification from the run_num
          and then adds the extension
          @param run_num: run number with optional period specified a after the letter 'p'
          @param ext: file extension
          @return: run specification (number.extension), period
      """
      if not run_num:
          return '', -1
      parts = re.split('[pP]', run_num)
      if len(parts) > 2:
          raise RuntimeError('Problem reading run number "'+run_num+'"')
      run_spec = parts[0]+ext
  
      if len(parts) == 2:
          period = parts[1]
      else:
          period = -1
  
      return run_spec, period
function_tokens: def parse_run ( run_num , ext ) : if not run_num : return '' , - 1 parts = re . split ( '[pP]' , run_num ) if len ( parts ) > 2 : raise RuntimeError ( 'Problem reading run number "' + run_num + '"' ) run_spec = parts [ 0 ] + ext if len ( parts ) == 2 : period = parts [ 1 ] else : period = - 1 return run_spec , period