def __init__(self,
	             session_type,
	             standalone):
		"""Constructor.
		Sets up:

				- shutit_modules          - representation of loaded shutit modules
				- shutit_main_dir         - directory in which shutit is located
				- cfg                     - dictionary of configuration of build
				- shutit_map              - maps module_ids to module objects

		standalone - Whether this is a shutit object created dynamically (True)
		             within a python script, or as part of a shutit invocation (False).
		             If it's created dynamically, then this can make a difference to
		             how the configuration is collected.
		"""

		self.standalone                      = standalone
		# Store the root directory of this application.
		# http://stackoverflow.com/questions/5137497
		self.build                           = {}
		self.build['report']                 = ''
		self.build['mount_docker']           = False
		self.build['distro_override']        = ''
		self.build['shutit_command_history'] = []
		self.build['walkthrough']            = False # Whether to honour 'walkthrough' requests
		self.build['walkthrough_wait']       = -1 # mysterious problems setting this to 1 with fixterm
		self.build['log_config_path']        = None
		self.build['step_through']           = False
		self.build['ctrlc_stop']             = False
		self.build['ctrlc_passthrough']      = False
		self.build['have_read_config_file']  = False
		self.build['vagrant_run_dir']        = None
		self.build['this_vagrant_run_dir']   = None
		self.build['accept_defaults']        = None
		self.build['exam']                   = False

		# Host information - move to global?
		self.host                            = {}
		self.host['shutit_path']             = sys.path[0]
		self.host['calling_path']            = os.getcwd()
		self.build['asciinema_session']      = None
		self.build['asciinema_session_file'] = None

		# These used to be in shutit_global, so we pass them in as args so
		# the original reference can be put in shutit_global
		self.repository                      = {}
		self.expect_prompts                  = {}
		self.list_configs                    = {}
		self.target                          = {}
		self.action                          = {}
		# TODO: do we ever have more than one of these? YES
		self.shutit_pexpect_sessions         = {}
		self.shutit_map                      = {}
		self.shutit_file_map                 = {}
		self.list_modules                    = {} # list_modules' options
		self.current_shutit_pexpect_session  = None
		self.config_parser                   = None
		self.shutit_modules                  = set()
		# These are new members we dont have to provide compatibility for
		self.conn_modules                    = set()
		self.shutit_main_dir                 = os.path.abspath(os.path.dirname(__file__))
		self.shutit_global_object            = shutit_global.shutit_global_object

		# Needed for patterns
		self.cfg                             = {} # used to store module information
		self.shutitfile                      = {}
		self.cfg['shutitfile']               = self.shutitfile   # required for patterns
		self.cfg['skeleton']                 = {}                # required for patterns

		# Session type
		self.session_type                    = session_type

		# Unique id
		self.uuid_str                        = str(uuid.uuid4())

		# Logging
		self.loglevel                        = None
		self.logfile                         = None
		self.last_log_time                   = time.time()
		self.logging_setup_done              = False
		self.nocolor                         = False

		# Vagrant machine data
		self.vagrant_machines                = None
def __init__ ( self , session_type , standalone ) : self . standalone = standalone self . build = { } self . build [ 'report' ] = '' self . build [ 'mount_docker' ] = False self . build [ 'distro_override' ] = '' self . build [ 'shutit_command_history' ] = [ ] self . build [ 'walkthrough' ] = False self . build [ 'walkthrough_wait' ] = - 1 self . build [ 'log_config_path' ] = None self . build [ 'step_through' ] = False self . build [ 'ctrlc_stop' ] = False self . build [ 'ctrlc_passthrough' ] = False self . build [ 'have_read_config_file' ] = False self . build [ 'vagrant_run_dir' ] = None self . build [ 'this_vagrant_run_dir' ] = None self . build [ 'accept_defaults' ] = None self . build [ 'exam' ] = False self . host = { } self . host [ 'shutit_path' ] = sys . path [ 0 ] self . host [ 'calling_path' ] = os . getcwd ( ) self . build [ 'asciinema_session' ] = None self . build [ 'asciinema_session_file' ] = None self . repository = { } self . expect_prompts = { } self . list_configs = { } self . target = { } self . action = { } self . shutit_pexpect_sessions = { } self . shutit_map = { } self . shutit_file_map = { } self . list_modules = { } self . current_shutit_pexpect_session = None self . config_parser = None self . shutit_modules = set ( ) self . conn_modules = set ( ) self . shutit_main_dir = os . path . abspath ( os . path . dirname ( __file__ ) ) self . shutit_global_object = shutit_global . shutit_global_object self . cfg = { } self . shutitfile = { } self . cfg [ 'shutitfile' ] = self . shutitfile self . cfg [ 'skeleton' ] = { } self . session_type = session_type self . uuid_str = str ( uuid . uuid4 ( ) ) self . loglevel = None self . logfile = None self . last_log_time = time . time ( ) self . logging_setup_done = False self . nocolor = False self . vagrant_machines = None
Constructor.
		Sets up:

				- shutit_modules          - representation of loaded shutit modules
				- shutit_main_dir         - directory in which shutit is located
				- cfg                     - dictionary of configuration of build
				- shutit_map              - maps module_ids to module objects

		standalone - Whether this is a shutit object created dynamically (True)
		             within a python script, or as part of a shutit invocation (False).
		             If it's created dynamically, then this can make a difference to
		             how the configuration is collected.