def get_execution_platform(command, filename):
  """
  <Purpose>
    Returns the execution platform based on a best-guess approach using
    the specified command, as well as the a file's extension.  The
    command takes precedence over the file extension.  If the extension
    is not recognized, then it will be assumed that it is repyV2.

  <Arguments>
    command: The command that should be parsed.
    filename: The file whose repy version should be returned.

  <Side Effects>
    None

  <Exceptions>
    None

  <Returns>
    A string indicating which version of repy a program is in, based on
    its file extension.  This will be either "v1" or "v2".
  """
  if command.endswith('v2'):
    return 'repyV2'
  elif command.endswith('v1'):
    return 'repyV1'

  # Information on extensions for repy programs can be found on #1286.
  if filename.endswith('.r2py'):
    return 'repyV2'
  else:
    return 'repyV1'