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

  • <tfoot id='tAwfP'></tfoot>
      <bdo id='tAwfP'></bdo><ul id='tAwfP'></ul>

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

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

        <legend id='tAwfP'><style id='tAwfP'><dir id='tAwfP'><q id='tAwfP'></q></dir></style></legend>

      1. 如何在 tkinter、Python 3.2.5 的文本框中打印并讓用

        How do I print and have user input in a text box in tkinter, Python 3.2.5?(如何在 tkinter、Python 3.2.5 的文本框中打印并讓用戶輸入?)
        <i id='XRrbl'><tr id='XRrbl'><dt id='XRrbl'><q id='XRrbl'><span id='XRrbl'><b id='XRrbl'><form id='XRrbl'><ins id='XRrbl'></ins><ul id='XRrbl'></ul><sub id='XRrbl'></sub></form><legend id='XRrbl'></legend><bdo id='XRrbl'><pre id='XRrbl'><center id='XRrbl'></center></pre></bdo></b><th id='XRrbl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='XRrbl'><tfoot id='XRrbl'></tfoot><dl id='XRrbl'><fieldset id='XRrbl'></fieldset></dl></div>
        <legend id='XRrbl'><style id='XRrbl'><dir id='XRrbl'><q id='XRrbl'></q></dir></style></legend>
              <tfoot id='XRrbl'></tfoot>
                <tbody id='XRrbl'></tbody>

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

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

                  本文介紹了如何在 tkinter、Python 3.2.5 的文本框中打印并讓用戶輸入?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我對 Python 完全陌生,我剛剛編寫了一小段代碼,用于在 python shell 中打印并請求輸入.它就像一本日記,要求輸入日期,然后打印該日期的條目.我希望將此調用和響應合并到 tkinter GUI 中的文本框中.我想知道如何讓這段代碼在文本框中而不是在 python shell 中執行.

                  I am completely new to Python, and I just wrote a short bit of code that prints and asks for input in the python shell. It works like a diary where it asks for a date and then prints the entries for that date. I was hoping to incorporate this call and response into a text box in a tkinter GUI. I am wondering how to get this bit of code to perform in the text box instead of in the python shell.

                  month = int(float(input("Month(MM): ")))
                  day = int(float(input("Day(DD): ")))
                  year = int(float(input("Year(YYYY): ")))
                  
                  print(str(month)+"/"+str(day)+"/"+str(year))
                  
                  noEntry = True
                  
                  if month == 1 and day == 2 and year == 3456:
                      noEntry = False
                      print("Text")
                  if month == 7 and day == 8 and year == 9012:
                      noEntry = False
                      print("More Text")
                  if noEntry:
                      print("No Entry Found")
                  

                  我還想避免將此代碼作為外部文件調用.我想知道如何將此代碼實現到 tkinter GUI 文本框中,而不是如何檢索包含此代碼的文件.主要是因為它是一個如此短的程序,似乎沒有必要.提前感謝您的幫助!

                  I would also like to avoid calling for this code as an outside file. I want to know how to implement this code into a tkinter GUI text box, not how to retrieve a file which contains this code. Mostly because it is such a short program and it seems unnecessary. Thanks for the help in advance!

                  推薦答案

                  這是一個基本的 Tk 窗口,它將接受月、日和年的輸入

                  Here is a basic Tk window that will take input for month, day and year

                  from Tkinter import *
                  
                  root = Tk()
                  
                  
                  label1 = Label( root, text="Month(MM)")
                  E1 = Entry(root, bd =5)
                  
                  label2 = Label( root, text="Day(DD)")
                  E2 = Entry(root, bd =5)
                  
                  label3 = Label( root, text="Year(YYYY)")
                  E3 = Entry(root, bd =5)
                  
                  def getDate():
                      print E1.get()
                      print E2.get()
                      print E3.get()
                  
                  submit = Button(root, text ="Submit", command = getDate)
                  
                  label1.pack()
                  E1.pack()
                  label2.pack()
                  E2.pack()
                  label3.pack()
                  E3.pack()
                  submit.pack(side =BOTTOM) 
                  root.mainloop()
                  

                  當您單擊提交時,它會打印月份和年份,我相信您可以弄清楚從那里

                  when you click submit it prints the month day and year and im sure you can figure it out from there

                  編輯

                  這里是一個顯示日記條目的文本框示例:

                  here is an example of a text box to display the diary entry:

                  from Tkinter import *
                  
                  root = Tk()
                  text = Text(root)
                  text.insert(INSERT, diary)
                  text.pack()
                  
                  root.mainloop()
                  

                  在本例中,diary 是日記條目字符串!

                  in this example diary is the diary entry string!

                  祝你好運:)

                  這篇關于如何在 tkinter、Python 3.2.5 的文本框中打印并讓用戶輸入?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復導入頂級名稱的情況下構造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發帶有已編譯動態共享庫的 Python 包)
                  <i id='5E3iA'><tr id='5E3iA'><dt id='5E3iA'><q id='5E3iA'><span id='5E3iA'><b id='5E3iA'><form id='5E3iA'><ins id='5E3iA'></ins><ul id='5E3iA'></ul><sub id='5E3iA'></sub></form><legend id='5E3iA'></legend><bdo id='5E3iA'><pre id='5E3iA'><center id='5E3iA'></center></pre></bdo></b><th id='5E3iA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5E3iA'><tfoot id='5E3iA'></tfoot><dl id='5E3iA'><fieldset id='5E3iA'></fieldset></dl></div>

                  <small id='5E3iA'></small><noframes id='5E3iA'>

                      • <bdo id='5E3iA'></bdo><ul id='5E3iA'></ul>

                            <tbody id='5E3iA'></tbody>

                          <tfoot id='5E3iA'></tfoot>
                        • <legend id='5E3iA'><style id='5E3iA'><dir id='5E3iA'><q id='5E3iA'></q></dir></style></legend>
                            主站蜘蛛池模板: 免费成人高清在线视频 | www.天天操| 成人免费网视频 | 无吗视频 | 激情在线视频 | 毛片在线免费 | 久久精品电影 | 精品国产一区二区三区性色av | 亚洲欧美一区二区三区在线 | 中文字幕一区二区视频 | 精品成人免费一区二区在线播放 | 操久久| 国产精品久久久久av | 日韩精品久久久 | 精品动漫一区 | 国产成人一区二区 | 嫩草国产 | 国产小u女发育末成年 | 久久国产成人 | 99精品久久久 | 成人一区精品 | 国产激情在线观看 | av网址在线播放 | 午夜免费网 | 国产在线精品一区二区三区 | 欧美日韩精品一区二区三区四区 | 国产精品久久精品 | 成人不卡视频 | 国产精品1区2区3区 一区中文字幕 | 精产嫩模国品一二三区 | 日韩精品一区二区三区 | 成人欧美一区二区三区黑人孕妇 | 亚洲精品日日夜夜 | 久久国产精品-久久精品 | 中文字幕一区在线观看视频 | 国产成年人视频 | 操久久久| 免费在线色| 在线看一区二区三区 | 午夜欧美 | 国产精品一区久久久久 |