# I'd use tkinter for python 3
import tkinter
tk = tkinter.Tk()
tk.geometry("400x300+500+300")
l = Label(tk,text="")
l.pack()
e = Entry(tk)
e.pack()
def click():
e['text'] = 'You clicked the button'
b = Button(tk,text="Click me",command=click)
b.pack()
tk.mainloop()
# After this I would you py2exe
# search for the use of this module on stakoverflow
# otherwise I could edit this to let you know how to do it
py2exe
फिर आपको py2exe का उपयोग करना चाहिए, उदाहरण के लिए, ऐप को चलाने के लिए आवश्यक सभी फ़ाइलों को एक फ़ोल्डर में लाने के लिए, भले ही उपयोगकर्ता को अपने पीसी पर पायथन नहीं है (मैं विंडोज़ की बात कर रहा हूं ... सेब के लिए कोई ज़रूरत नहीं है एक निष्पादन योग्य फ़ाइल का, मुझे लगता है, क्योंकि इसमें इसे स्थापित करने की आवश्यकता के बिना इसमें पाइथन के साथ आते हैं।
इस फाइल को बनाएँ
1) एक setup.py बनाएँ
इस कोड के साथ:
distutils.core आयात सेटअप से
आयात py2exe
सेटअप (सांत्वना = [ 'l4h.py'])
इसे एक फ़ोल्डर में सहेजें
2) अपने प्रोग्राम को setup.py के उसी फ़ोल्डर में रखें
इस फ़ोल्डर में उस प्रोग्राम को डालें जिसे आप इसे विचलित बनाना चाहते हैं:
es: l4h.py
ps: फ़ाइल का नाम बदलें (l4h से जो कुछ भी आप चाहते हैं, वह एक उदाहरण है)
3) Run cmd from that folder (on the folder, right click + shift and choose start cmd here)
4) write in cmd:>python setup.py py2exe
5) in the dist folder there are all the files you need
6) you can zip it and distribute it