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

<tfoot id='7QYpQ'></tfoot>

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

      <bdo id='7QYpQ'></bdo><ul id='7QYpQ'></ul>

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

      1. 在 Python 中彈出圖形對話框的最簡單的跨平臺方法

        What#39;s the simplest cross-platform way to pop up graphical dialogs in Python?(在 Python 中彈出圖形對話框的最簡單的跨平臺方法是什么?)

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

              <tbody id='XqmpL'></tbody>

            <legend id='XqmpL'><style id='XqmpL'><dir id='XqmpL'><q id='XqmpL'></q></dir></style></legend>
          1. <small id='XqmpL'></small><noframes id='XqmpL'>

                • <bdo id='XqmpL'></bdo><ul id='XqmpL'></ul>
                • <tfoot id='XqmpL'></tfoot>
                  本文介紹了在 Python 中彈出圖形對話框的最簡單的跨平臺方法是什么?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想要在 Python 腳本中彈出簡單對話框的最簡單方法.理想情況下,解決方案是:

                  • 在 Windows、OS X、Gnome、KDE ??上工作
                  • 看起來像任何操作系統上的原生對話框
                  • 需要最少的代碼

                  要彈出一個簡單的標準對話框,只需要最少的代碼.本質上,您只是說彈出一個帶有此文本的標準對話框",或彈出一個帶有問題 x 的對話框并將響應輸入變量 y".

                  這適用于在命令行上運行的簡單腳本.我不想了解 GUI 框架,也不想設置啟動 GUI 線程、注冊事件處理程序、配置一些窗口屬性、運行循環"等代碼.我不想設置之后打開一個窗口或關閉窗口.我給它文本以放入窗口和/或按鈕和/或復選框,它返回用戶點擊的內容.其他一切都應該自動處理.例如:

                  message_box('文件轉換完成')

                  對于帶有確定"按鈕的標準對話框,或

                  balloon_tip('文件轉換完成')

                  用于系統托盤彈出氣球,或

                  format = button_box('你想要哪種文件格式?', 'JPG', 'PNG')

                  他們按下兩個按鈕之一,然后 format 等于 'JPG',或者

                  response = text_query('你想給文件取什么名字?')

                  在他們輸入框并按確定后,response 現在等于 'bananas.txt'.無需其他代碼.可憐的用戶沒有丑陋的命令行提示.

                  我將 Zenity 和 EasyGUI 列為示例答案,因為它們與我想要的相似,但并不完美.

                  [ 和 文檔非常整潔.

                  之前,還有一個名為 EasyGuiTtk 的分支,遺憾的是不再可用.p>

                  I want the simplest possible way to pop up simple dialogs in Python scripts. Ideally, the solution would:

                  • Work on Windows, OS X, Gnome, KDE
                  • Look like a native dialog on any OS
                  • Require minimal code

                  To pop up a simple standard dialog should require only minimal code. Essentially you're just saying "Pop up a standard dialog with this text", or "Pop up a dialog with question x and feed response into variable y".

                  This is for simple scripts that would otherwise run on the command line. I don't want to know about GUI frameworks or have to set up code that says "start a GUI thread, register an event handler, configure some window properties, run a loop", etc. I don't want to have to set up a window or close the window afterward. I give it the text to put in the window and/or buttons and/or checkboxes, it returns what the user clicked on. Everything else should be taken care of automatically. For example:

                  message_box('File conversion complete')
                  

                  for a standard dialog box with an "Ok" button, or

                  balloon_tip('File conversion complete')
                  

                  for a system tray popup balloon, or

                  format = button_box('Which file format do you want?', 'JPG', 'PNG')
                  

                  and they press one of the two buttons, and then format equals 'JPG', or

                  response = text_query('What would you like to name the file?')
                  

                  and after they type in the box and press Ok, response now equals 'bananas.txt'. No other code required. No ugly command line prompts for the poor user.

                  I've listed Zenity and EasyGUI as example answers, since they're similar to what I want, but not perfect.

                  [Previously asked on Python Forum]

                  解決方案

                  EasyGUI is a single file, and provides a simple way to work with Tkinter dialogs, but they're still ugly non-native Tkinter dialogs.

                  from easygui import msgbox
                  msgbox('Stuff')
                  

                  It can easily be installed using:

                  $ sudo pip3 install --upgrade easygui
                  

                  There is a GitHub repository and documentation is very neat.

                  Previously, there was also a fork called EasyGuiTtk, which unfortunately is no longer available.

                  這篇關于在 Python 中彈出圖形對話框的最簡單的跨平臺方法是什么?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)

                • <small id='btZHG'></small><noframes id='btZHG'>

                    <tbody id='btZHG'></tbody>
                • <legend id='btZHG'><style id='btZHG'><dir id='btZHG'><q id='btZHG'></q></dir></style></legend>
                    <bdo id='btZHG'></bdo><ul id='btZHG'></ul>

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

                            主站蜘蛛池模板: 亚洲综合视频 | 粉色午夜视频 | 亚洲a视频 | 国产激情一区二区三区 | 一区二区三区在线看 | 日日操夜夜操天天操 | 日韩精品a在线观看图片 | 日一日操一操 | 国产精品视频一区二区三区, | 中国一级毛片免费 | 婷婷国产一区 | 在线精品一区二区三区 | 欧美综合国产精品久久丁香 | 久久久91精品国产一区二区三区 | 国产 日韩 欧美 在线 | 中文字幕国产精品 | 色欧美综合 | 欧美一二三四成人免费视频 | 黄色在线免费看 | 欧美一级免费 | 精品国产一级 | 国产成人精品一区二区三区网站观看 | 在线中文字幕视频 | 羞羞视频网页 | 国产精品乱码一区二区三区 | 日韩av电影院 | 一区二区三区不卡视频 | 国产乱码精品一区二区三区五月婷 | v亚洲| 欧美一区二区免费在线 | 91视频88av | 亚洲精品一区二三区不卡 | 91青娱乐在线 | 中文字幕在线免费观看 | 精品乱子伦一区二区三区 | 在线一区二区三区 | 在线观看av网站 | 欧美四虎 | 国产日韩精品一区 | 999精品视频在线观看 | 成人欧美一区二区三区黑人孕妇 |