prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  cheyenne needs a module load python
  Now that we require python 3.5+, we need to do a module load python on cheyenne.
  
  The lack of this module load is responsible for a failure in `J_TestCreateNewcase.test_f_createnewcase_with_user_compset` if you run the whole `J_TestCreateNewcase` suite, and may cause other problems as well.
  
  I'll get a fix in shortly.
  
  </issue>
  <code>
  [start of scripts/Tools/standard_script_setup.py]
  1 """
  2 Encapsulate the importing of python utils and logging setup, things
  3 that every script should do.
  4 """
  5 # pylint: disable=unused-import
  6 
  7 import sys, os
  8 import __main__ as main
  9 _CIMEROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..","..")
  10 _LIB_DIR = os.path.join(_CIMEROOT, "scripts", "lib")
  11 sys.path.append(_LIB_DIR)
  12 
  13 # Important: Allows external tools to link up with CIME
  14 os.environ["CIMEROOT"] = _CIMEROOT
  15 
  16 import CIME.utils
  17 CIME.utils.check_minimum_python_version(2, 7)
  18 CIME.utils.stop_buffering_output()
  19 import logging, argparse
  20
  [end of scripts/Tools/standard_script_setup.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/scripts/Tools/standard_script_setup.py b/scripts/Tools/standard_script_setup.py
  --- a/scripts/Tools/standard_script_setup.py
  +++ b/scripts/Tools/standard_script_setup.py
  @@ -14,6 +14,6 @@
   os.environ["CIMEROOT"] = _CIMEROOT
   
   import CIME.utils
  -CIME.utils.check_minimum_python_version(2, 7)
  +CIME.utils.check_minimum_python_version(3, 6)
   CIME.utils.stop_buffering_output()
   import logging, argparse
  
verification_info: {"golden_diff": "diff --git a/scripts/Tools/standard_script_setup.py b/scripts/Tools/standard_script_setup.py\n--- a/scripts/Tools/standard_script_setup.py\n+++ b/scripts/Tools/standard_script_setup.py\n@@ -14,6 +14,6 @@\n os.environ[\"CIMEROOT\"] = _CIMEROOT\n \n import CIME.utils\n-CIME.utils.check_minimum_python_version(2, 7)\n+CIME.utils.check_minimum_python_version(3, 6)\n CIME.utils.stop_buffering_output()\n import logging, argparse\n", "issue": "cheyenne needs a module load python\nNow that we require python 3.5+, we need to do a module load python on cheyenne.\r\n\r\nThe lack of this module load is responsible for a failure in `J_TestCreateNewcase.test_f_createnewcase_with_user_compset` if you run the whole `J_TestCreateNewcase` suite, and may cause other problems as well.\r\n\r\nI'll get a fix in shortly.\n", "before_files": [{"content": "\"\"\"\nEncapsulate the importing of python utils and logging setup, things\nthat every script should do.\n\"\"\"\n# pylint: disable=unused-import\n\nimport sys, os\nimport __main__ as main\n_CIMEROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), \"..\",\"..\")\n_LIB_DIR = os.path.join(_CIMEROOT, \"scripts\", \"lib\")\nsys.path.append(_LIB_DIR)\n\n# Important: Allows external tools to link up with CIME\nos.environ[\"CIMEROOT\"] = _CIMEROOT\n\nimport CIME.utils\nCIME.utils.check_minimum_python_version(2, 7)\nCIME.utils.stop_buffering_output()\nimport logging, argparse\n", "path": "scripts/Tools/standard_script_setup.py"}]}