# Path: pysc2/lib/gfile.py



import collections
import datetime
import os
from pysc2.lib import gfile
  """Base class for different run configs."""

  def __init__(self, replay_dir, data_dir, tmp_dir, version,
               cwd=None, env=None):
    """Initialize the runconfig with the various directories needed.

    Args:
      replay_dir: Where to find replays. Might not be accessible to SC2.
      data_dir: Where SC2 should find the data and battle.net cache.
      tmp_dir: The temporary directory. None is system default.
      version: The game version to run, a string.
      cwd: Where to set the current working directory.
      env: What to pass as the environment variables.
    """
    self.replay_dir = replay_dir
    self.data_dir = data_dir
    self.tmp_dir = tmp_dir
    self.cwd = cwd
    self.env = env
    self.version = self._get_version(version)

  def map_data(self, map_name, players=None):
    """Return the map data for a map by name or path."""
    map_names = [map_name]
    if players:
      map_names.append(os.path.join(
          os.path.dirname(map_name),
          "(%s)%s" % (players, os.path.basename(map_name))))
    for name in map_names:
      path = os.path.join(self.data_dir, "Maps", name)

# Path: pysc2/lib/gfile.py



# Path: pysc2/run_configs/lib.py
import collections
import datetime
import os
from pysc2.lib import gfile

  """Base class for different run configs."""

  def __init__(self, replay_dir, data_dir, tmp_dir, version,
               cwd=None, env=None):
    """Initialize the runconfig with the various directories needed.

    Args:
      replay_dir: Where to find replays. Might not be accessible to SC2.
      data_dir: Where SC2 should find the data and battle.net cache.
      tmp_dir: The temporary directory. None is system default.
      version: The game version to run, a string.
      cwd: Where to set the current working directory.
      env: What to pass as the environment variables.
    """
    self.replay_dir = replay_dir
    self.data_dir = data_dir
    self.tmp_dir = tmp_dir
    self.cwd = cwd
    self.env = env
    self.version = self._get_version(version)

  def map_data(self, map_name, players=None):
    """Return the map data for a map by name or path."""
    map_names = [map_name]
    if players:
      map_names.append(os.path.join(
          os.path.dirname(map_name),
          "(%s)%s" % (players, os.path.basename(map_name))))
    for name in map_names:
      path = os.path.join(self.data_dir, "Maps", name)

      if gfile.Exists(path):