<i id='FZoJe'><tr id='FZoJe'><dt id='FZoJe'><q id='FZoJe'><span id='FZoJe'><b id='FZoJe'><form id='FZoJe'><ins id='FZoJe'></ins><ul id='FZoJe'></ul><sub id='FZoJe'></sub></form><legend id='FZoJe'></legend><bdo id='FZoJe'><pre id='FZoJe'><center id='FZoJe'></center></pre></bdo></b><th id='FZoJe'></th></span></q></dt></tr></i><div id='FZoJe'><tfoot id='FZoJe'></tfoot><dl id='FZoJe'><fieldset id='FZoJe'></fieldset></dl></div>

<small id='FZoJe'></small><noframes id='FZoJe'>

        <bdo id='FZoJe'></bdo><ul id='FZoJe'></ul>
        <tfoot id='FZoJe'></tfoot>
      1. <legend id='FZoJe'><style id='FZoJe'><dir id='FZoJe'><q id='FZoJe'></q></dir></style></legend>

        Kivy 中的 Time.sleep

        时间:2023-10-09
          <tbody id='ktwFn'></tbody>

            <small id='ktwFn'></small><noframes id='ktwFn'>

              <i id='ktwFn'><tr id='ktwFn'><dt id='ktwFn'><q id='ktwFn'><span id='ktwFn'><b id='ktwFn'><form id='ktwFn'><ins id='ktwFn'></ins><ul id='ktwFn'></ul><sub id='ktwFn'></sub></form><legend id='ktwFn'></legend><bdo id='ktwFn'><pre id='ktwFn'><center id='ktwFn'></center></pre></bdo></b><th id='ktwFn'></th></span></q></dt></tr></i><div id='ktwFn'><tfoot id='ktwFn'></tfoot><dl id='ktwFn'><fieldset id='ktwFn'></fieldset></dl></div>
                <bdo id='ktwFn'></bdo><ul id='ktwFn'></ul>
                  <legend id='ktwFn'><style id='ktwFn'><dir id='ktwFn'><q id='ktwFn'></q></dir></style></legend><tfoot id='ktwFn'></tfoot>
                  本文介绍了Kivy 中的 Time.sleep的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在 Kivy 中寻找类似 time.sleep 的东西,因为 kivy 不支持 time.sleep 并且当我使用 运行程序时它会挂起time.sleep.我搜索并找到了一个名为:

                  I am looking for some thing like time.sleep in Kivy, because kivy does not support time.sleep and it hangs when i run a program using time.sleep. I searched and found a function called:

                  Clock.schedule_interval(self.callback, interval)
                  

                  但它可能不像 time.sleep.Clock.schedule 每 x 秒调用一次函数,但我想延迟.

                  but its not probably like time.sleep. Clock.schedule calls a function every x seconds, but I want to make a delay.

                  kivy.clock

                  推荐答案

                  kivy 不支持 time.sleep

                  kivy does not support time.sleep

                  Kivy 支持 time.sleep 就好了,它只是不做你想让它做的事情 - 根据函数名称,它会休眠,这意味着 kivy '冻结',因为它不接受输入,更新图形等等

                  Kivy supports time.sleep just fine, it just doesn't do what you want it to do - as per the function name, it sleeps, which means kivy 'freezes' as it isn't taking input, updating the graphics etc.

                  不管怎样,听起来你想要Clock.schedule_once(function, time).这将在 time 秒内调用函数(带有默认参数 dt).

                  Anyway, it sounds like you want Clock.schedule_once(function, time). That will call the function (with a default argument dt) in time seconds.

                  这篇关于Kivy 中的 Time.sleep的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 Kivy 文本输入中水平居中文本? 下一篇:在 kivy 中,如何控制 TextInput 使用的 VKeyboard 的高

                  相关文章

                  最新文章

                    <bdo id='LQKYl'></bdo><ul id='LQKYl'></ul>

                1. <tfoot id='LQKYl'></tfoot>
                2. <legend id='LQKYl'><style id='LQKYl'><dir id='LQKYl'><q id='LQKYl'></q></dir></style></legend>

                    <small id='LQKYl'></small><noframes id='LQKYl'>

                    <i id='LQKYl'><tr id='LQKYl'><dt id='LQKYl'><q id='LQKYl'><span id='LQKYl'><b id='LQKYl'><form id='LQKYl'><ins id='LQKYl'></ins><ul id='LQKYl'></ul><sub id='LQKYl'></sub></form><legend id='LQKYl'></legend><bdo id='LQKYl'><pre id='LQKYl'><center id='LQKYl'></center></pre></bdo></b><th id='LQKYl'></th></span></q></dt></tr></i><div id='LQKYl'><tfoot id='LQKYl'></tfoot><dl id='LQKYl'><fieldset id='LQKYl'></fieldset></dl></div>