久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <legend id='5v9In'><style id='5v9In'><dir id='5v9In'><q id='5v9In'></q></dir></style></legend>
    <i id='5v9In'><tr id='5v9In'><dt id='5v9In'><q id='5v9In'><span id='5v9In'><b id='5v9In'><form id='5v9In'><ins id='5v9In'></ins><ul id='5v9In'></ul><sub id='5v9In'></sub></form><legend id='5v9In'></legend><bdo id='5v9In'><pre id='5v9In'><center id='5v9In'></center></pre></bdo></b><th id='5v9In'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5v9In'><tfoot id='5v9In'></tfoot><dl id='5v9In'><fieldset id='5v9In'></fieldset></dl></div>
  1. <small id='5v9In'></small><noframes id='5v9In'>

    <tfoot id='5v9In'></tfoot>
      <bdo id='5v9In'></bdo><ul id='5v9In'></ul>

    1. Python/Kivy App 只運(yùn)行一次

      Python / Kivy App running only once(Python/Kivy App 只運(yùn)行一次)
      1. <tfoot id='7vlgk'></tfoot>

              <small id='7vlgk'></small><noframes id='7vlgk'>

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

            1. <legend id='7vlgk'><style id='7vlgk'><dir id='7vlgk'><q id='7vlgk'></q></dir></style></legend>
                <bdo id='7vlgk'></bdo><ul id='7vlgk'></ul>

                  <tbody id='7vlgk'></tbody>
              • 本文介紹了Python/Kivy App 只運(yùn)行一次的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我正在使用 Anaconda 平臺的 Spyder IDE 運(yùn)行一個非常簡單的 python (3.5) 腳本.

                I'm running a very simple python (3.5) script using Spyder IDE from Anaconda platform.

                from kivy.app import App
                from kivy.uix.label import Label
                from kivy.uix.gridlayout import GridLayout
                from kivy.uix.textinput import TextInput
                
                class LoginScreen(GridLayout):
                    def __init__(self, **kwargs):
                        super(LoginScreen,self).__init__(*kwargs)
                        self.cols = 2
                        self.add_widget(Label(text='Username'))
                        self.username = TextInput(multiline=False)
                        self.add_widget(self.username)
                    
                        self.add_widget(Label(text='Password'))
                        self.password = TextInput(multiline=False, password=True)
                        self.add_widget(self.password)
                
                class TestApp(App):
                    def build(self):
                        return LoginScreen()
                
                if __name__ == '__main__':
                    TestApp().run()
                

                應(yīng)用程序"第一次嘗試運(yùn)行良好(它還沒有做任何事情,只是啟動),但是當(dāng)我嘗試再次啟動它時,我收到以下錯誤消息:

                "App" runs fine on the first try (it doesn't do anything yet, just launches), but when I'm trying to launch it again, I'm getting a following error message:

                [INFO] [Base] 啟動應(yīng)用程序主循環(huán)

                [INFO ] [Base ] Start application main loop

                [ERROR] [Base] 沒有創(chuàng)建事件監(jiān)聽器

                [ERROR ] [Base ] No event listeners have been created

                [ERROR ] [Base ] 應(yīng)用程序?qū)㈦x開

                [ERROR ] [Base ] Application will leave

                讓它再次工作的唯一方法是重新啟動在 Spyder 中運(yùn)行的內(nèi)核.之后,應(yīng)用程序?qū)⒃俅螁?但僅啟動一次).

                The only way to make it work again is to restart the kernel running in Spyder. After that the app will launch once again (but only once).

                我注意到,在第一次運(yùn)行時,Ipython 控制臺會首先打印很多其他信息,在啟動應(yīng)用程序主循環(huán)"之前.行,在那些失敗的運(yùn)行中,我只得到上面那 3 行.

                What I've noticed is that on the first run, the Ipython console would print a lot of other info first, before the "Start application main loop" line, and on those failed runs, I'm getting just those 3 lines above.

                有誰知道我做錯了什么?非常感謝您的幫助.

                Does anyone know what I'm doing wrong? Many thanks for any help.

                推薦答案

                沒有那么多與 Kivy 相關(guān)的問題.Spyder 可能會在內(nèi)存中保留舊的東西?嘗試在一個簡單的解釋器中逐行鍵入您的代碼.然后關(guān)閉應(yīng)用程序并再次嘗試輸入 TestApp().run() - 相同的三行.

                Not that much Kivy-related problem. Spyder probably keeps old stuff in memory? Try in a simple interpreter type your code line by line. Then close the app and try again typing TestApp().run() - the same three lines.

                這樣你會看到如果舊的東西(變量、類、任何仍然可以訪問的東西)存在,Kivy 將不允許你啟動應(yīng)用程序(對我來說仍然是一個謎,可能是因?yàn)榕c窗口相關(guān)代碼?)

                This way you'll see that if the old stuff (variables, classes, whatever is still accessible) is present, Kivy won't allow you to launch the app (still a mistery to me, maybe because of window-related code?)

                如果 Spyder 中有什么東西可以從內(nèi)存中清除舊的東西,那么在每次 Kivy 退出后設(shè)置它,你應(yīng)該很高興.

                If there is something in Spyder to flush old stuff from memory, then set it after each Kivy exit and you should be good to go.

                這篇關(guān)于Python/Kivy App 只運(yùn)行一次的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機(jī)器人?)
                Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒有響應(yīng)命令)
                Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                message.channel.id Discord PY(message.channel.id Discord PY)
                How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)
                  <tbody id='chFaY'></tbody>
                <i id='chFaY'><tr id='chFaY'><dt id='chFaY'><q id='chFaY'><span id='chFaY'><b id='chFaY'><form id='chFaY'><ins id='chFaY'></ins><ul id='chFaY'></ul><sub id='chFaY'></sub></form><legend id='chFaY'></legend><bdo id='chFaY'><pre id='chFaY'><center id='chFaY'></center></pre></bdo></b><th id='chFaY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='chFaY'><tfoot id='chFaY'></tfoot><dl id='chFaY'><fieldset id='chFaY'></fieldset></dl></div>
              • <tfoot id='chFaY'></tfoot>

                  • <bdo id='chFaY'></bdo><ul id='chFaY'></ul>

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

                        1. <legend id='chFaY'><style id='chFaY'><dir id='chFaY'><q id='chFaY'></q></dir></style></legend>

                        2. 主站蜘蛛池模板: 羞羞午夜 | 欧美国产视频 | 成人免费大片黄在线播放 | 久久久久久中文字幕 | 精品91久久 | 午夜欧美一区二区三区在线播放 | 国产精品一卡 | 午夜视频在线免费观看 | 日韩黄| 成人精品一区二区三区中文字幕 | 精品视频 免费 | 国产精品夜色一区二区三区 | 欧美成人一区二区三区 | 中文在线一区二区 | 天天干天天色 | 91精品国产一区 | 国产精品一区二区欧美黑人喷潮水 | 精品成人 | 久久久久久91 | 中文字幕av网址 | 欧美一区二区三区在线观看 | 黑人一级片视频 | 岛国精品 | 91精品国产91久久综合桃花 | 在线精品亚洲欧美日韩国产 | 亚洲国产精品久久久久婷婷老年 | 玖草资源| jlzzjlzz欧美大全 | 亚洲一区二区免费 | 天天射天天操天天干 | 久久国产精品一区二区三区 | 久久这里只有精品首页 | 国产精品美女久久久久久久网站 | 日韩精品福利 | 99精品一区 | 国产精品成人在线观看 | 国产成人高清在线观看 | 精品国产不卡一区二区三区 | 久久久精品视频一区二区三区 | 国产一区二区三区免费视频 | 精品国产三级 |