Launch Malmo Minecraft Mod in one or more clients from 
       the Minecraft directory on the (optionally) given ports.
       Args:
           ports: an optionsl list of ports to start minecraft clients on. 
           Defaults to a single Minecraft client on port 10000.
           wait_timeout: optional time in seconds to wait (defaults to 3 mins).

def launch_minecraft(ports = [], wait_timeout = 360):
    """Launch Malmo Minecraft Mod in one or more clients from 
       the Minecraft directory on the (optionally) given ports.
       Args:
           ports: an optionsl list of ports to start minecraft clients on. 
           Defaults to a single Minecraft client on port 10000.
           wait_timeout: optional time in seconds to wait (defaults to 3 mins).
    """
    if "MALMO_XSD_PATH" not in os.environ:
        print("Please set the MALMO_XSD_PATH environment variable.")
        return
    cwd = os.getcwd()
    try:
        os.chdir(malmo_install_dir + "/Minecraft")
        launch_minecraft_in_background(os.getcwd(), ports, wait_timeout)
    finally:
        os.chdir(cwd)