# Path: speriment/utils.py
# def check_list(obj, attribute):
#     if hasattr(obj, attribute) and type(getattr(obj, attribute)) != list:
#         raise ValueError, '''{} in {} must be a list.'''.format(attribute, obj)


from component import Component
from option import Option
from speriment.utils import check_list
        ordered: boolean, whether the Options for this Page need to be kept in
        the order in which they were given. If True, the Options may be reversed
        but will not be shuffled.

        exclusive: boolean, whether the participant can choose only one Option
        as their response.

        freetext: boolean, whether the Option is a text box rather than multiple
        choice.

        keyboard: boolean or [character], representing how Options are to be
        selected. If False, they are selected with the mouse. If True and there
        are exactly two Options, the left is selected with the f key and the
        right with the j key. If a list of characters, there must be as many
        characters as options. They will be mapped onto the options from left to
        right, as the options are displayed on the screen in shuffled order.

        run_if: RunIf, optional. If given, runIf's condition must be satisfied for this
        Page to display.
        '''
        self._set_id(id_str)
        self.text = text
        self._set_optional_args(**kwargs)
        if options:
            self.options = options

    def _validate_resources(self):
        pass # check for supported filetypes

    def _validate_lists(self):

# Path: speriment/utils.py
# def check_list(obj, attribute):
#     if hasattr(obj, attribute) and type(getattr(obj, attribute)) != list:
#         raise ValueError, '''{} in {} must be a list.'''.format(attribute, obj)


# Path: speriment/components/page.py
from component import Component
from option import Option
from speriment.utils import check_list

        ordered: boolean, whether the Options for this Page need to be kept in
        the order in which they were given. If True, the Options may be reversed
        but will not be shuffled.

        exclusive: boolean, whether the participant can choose only one Option
        as their response.

        freetext: boolean, whether the Option is a text box rather than multiple
        choice.

        keyboard: boolean or [character], representing how Options are to be
        selected. If False, they are selected with the mouse. If True and there
        are exactly two Options, the left is selected with the f key and the
        right with the j key. If a list of characters, there must be as many
        characters as options. They will be mapped onto the options from left to
        right, as the options are displayed on the screen in shuffled order.

        run_if: RunIf, optional. If given, runIf's condition must be satisfied for this
        Page to display.
        '''
        self._set_id(id_str)
        self.text = text
        self._set_optional_args(**kwargs)
        if options:
            self.options = options

    def _validate_resources(self):
        pass # check for supported filetypes

    def _validate_lists(self):

        check_list(self, 'options')