def save( self, fileObject, nameRegex = None ) :

		# decide what to write
		namesToWrite = []
		for name in self.names() :
			if nameRegex.match( name ) or nameRegex is None :
				namesToWrite.append( name )

		# write the necessary import statement and acquire the layouts
		fileObject.write( "import GafferUI\n\n" )
		fileObject.write( "layouts = GafferUI.Layouts.acquire( application )\n\n" )

		# finally write out the layouts
		for name in namesToWrite :
			fileObject.write( "layouts.add( \"%s\", \"%s\" )\n\n" % ( name, self.__namedLayouts[name] ) )

		# tidy up by deleting the temporary variable, keeping the namespace clean for
		# subsequently executed config files.
		fileObject.write( "del layouts\n" )

	## The EditorWidget factory provides access to every single registered subclass of
	# editor, but specific applications may wish to only provide a subset of those
	# editors to the user. This method is used from config files to define the subset
	# of editors to use in the application.
dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUI/Layouts.py/Layouts.save/original