Module geode.lib.emulator
Expand source code
# ------------------------------------------------------------------------------
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# ------------------------------------------------------------------------------
# API
from geode.utils import get_binary_path
from geode.lib.common import CommonObject
# ------------------------------------------------------------------------------
# Class
# ------------------------------------------------------------------------------
class Emulator(CommonObject):
attributes = (
("metadata", "name", None),
("metadata", "binary", None),
("path", "configuration", None),
("pattern", "savestate", None),
("pattern", "snapshot", None),
("option", "default", None),
("option", "windowed", None),
("option", "fullscreen", None))
def __init__(self, *args):
""" Constructor
"""
super(Emulator, self).__init__(*args)
@property
def exists(self):
""" Check binary existence in user system
Returns
-------
bool
return True if binary exist, False otherwise
"""
return len(get_binary_path(self.binary)) > 0
Classes
class Emulator (*args)
-
Constructor
Expand source code
class Emulator(CommonObject): attributes = ( ("metadata", "name", None), ("metadata", "binary", None), ("path", "configuration", None), ("pattern", "savestate", None), ("pattern", "snapshot", None), ("option", "default", None), ("option", "windowed", None), ("option", "fullscreen", None)) def __init__(self, *args): """ Constructor """ super(Emulator, self).__init__(*args) @property def exists(self): """ Check binary existence in user system Returns ------- bool return True if binary exist, False otherwise """ return len(get_binary_path(self.binary)) > 0
Ancestors
Class variables
var attributes
-
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items.
If the argument is a tuple, the return value is the same object.
Instance variables
var exists
-
Check binary existence in user system
Returns
bool
- return True if binary exist, False otherwise
Expand source code
@property def exists(self): """ Check binary existence in user system Returns ------- bool return True if binary exist, False otherwise """ return len(get_binary_path(self.binary)) > 0
Inherited members