Пример #1
0
	def create_pinproc(self):
		"""Instantiates and returns the class to use as the P-ROC device.
		This method is called by :class:`GameController`'s init method to populate :attr:`proc`.
		
		Checks :mod:`~procgame.config` for the key path ``pinproc_class``.
		If that key path exists the string is used as the fully qualified class name
		to instantiate.  The class is then instantiated with one initializer argument,
		:attr:`machine_type`.
		
		If that key path does not exist then this method returns an instance of :class:`pinproc.PinPROC`.
		"""
		klass_name = config.value_for_key_path('pinproc_class', 'pinproc.PinPROC')
		klass = util.get_class(klass_name)
		return klass(self.machine_type)
Пример #2
0
	def create_pinproc(self):
		"""Instantiates and returns the class to use as the P-ROC device.
		This method is called by :class:`GameController`'s init method to populate :attr:`proc`.
		
		Checks :mod:`~procgame.config` for the key path ``pinproc_class``.
		If that key path exists the string is used as the fully qualified class name
		to instantiate.  The class is then instantiated with one initializer argument,
		:attr:`machine_type`.
		
		If that key path does not exist then this method returns an instance of :class:`pinproc.PinPROC`.
		"""
		klass_name = config.value_for_key_path('pinproc_class', 'pinproc.PinPROC')
		klass = util.get_class(klass_name)
		return klass(self.machine_type)