Running python code through user friendly interface

后端 未结 1 1069
没有蜡笔的小新
没有蜡笔的小新 2021-01-29 08:06

additional question I\'m working on a project for a family member, I have fairly limited experience with Python. I have written my script on Python, and it work

相关标签:
1条回答
  • 2021-01-29 08:30

    Tkinter has an input field function so you could do something like:

    from tkinter import *
    
    def Get_Name_Of_Picture():
        original=str(PicName.get())
    
    PicName=Entry(screen)
    PicName.pack()
    
    Button(screen, text='Enter', command=Get_Name_Of_Picture).pack(side=LEFT)
    

    Something like that(you might have to put the rest of the code in the Get_Name_Of_Picture function) but this will allow the user to type an input into an entry field, and once they are done hit the enter button which will get the string of what was typed and so on.

    If you need more advice just comment on this answer and I will try to help.

    0 讨论(0)
提交回复
热议问题