从类到类的kivy变量

时间:2016-03-17 02:17:37

标签: python class kivy

我想将变量OverallScreenOne转移到ScreenTwo。这可能吗?

class ScreenOne(Screen):

    def __init__(self,**kwargs):
        super (ScreenOne,self).__init__(**kwargs)

        x = random.randint(3,3)
        random_question = Questions[x][0]
        self.ans = Questions[x][5]
        self.Overall = 0


class ScreenTwo(Screen):

    def __init__(self,**kwargs):
        super (ScreenTwo,self).__init__(**kwargs)

        x = random.randint(0,99)
        random_question = Questions[x][0]
        self.ans = Questions[x][5]
        self.Overall = ScreenOne.Overall

0 个答案:

没有答案