Author Topic: Tkinter import  (Read 300 times)

N33n0Gr33n

  • Full Member
  • ***
  • Posts: 116
  • Reputation: 1
  • Rogue ininja
  • Computers: Dell,HP
  • iDevices: Iphone4,HTC
Tkinter import
« on: September 03, 2012, 07:50:40 pm »
What's up

I have searched I google and I did the finger crawling I also hit other forums.

     My question is, is there anyone who is experianced with pythonios. I'm having trouble with tkinter import, I'm following a python PDF for beginners I'll give you guys the code and the error

Code:


from tkinter import *

class application(Frame):
    def say_yeh(self):
        print("yeh! your buttons just did something!")                                               
    def createWidgets (self):
        self.QUITBUTTON = Button(self)
        self.QUITBUTTON["text"] = QUITBUTTON
        self.QUITBUTTON["fg"] = "red"
        self.QUITBUTTON["command"]= selfquit
    
        self.QUITBUTTON.pack({side : left})

        self.do_something = Button(self)
        self.do_something ["text"] = "CLICK TO DO SOMETHING BUTTON",
        self.do_something["command"] = self.say_yeh
                                   
        self.do_something({side : left})

    def _int_(self, master=None):
        Frame._init_(self, master)
        self.pack()
        self.creatWidgets()

root = TK()
app = Application(master=root)
app.mainloop()
root.destroy()

Error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/var/mobile/Applications/3012E63C-E6FF-40CC-9CB9-73D671212DC0/Documents/User Scripts/tkinter.py", line 3, in <module>
    class application(Frame):
NameError: name 'Frame' is not defined



    


A12danrulz

  • Leader
  • Hero Member
  • *****
  • Posts: 4016
  • Reputation: 216
  • Badges:
Re: Tkinter import
« Reply #1 on: September 03, 2012, 07:53:47 pm »
Tkinter doesn't work on iOS without a running X server, like iSSH

Ironman

  • Administrator
  • Hero Member
  • *****
  • Posts: 5099
  • Reputation: 251
  • Badges:
  • Computers: ASUS UL50VT
  • iDevices: iPhone 5, iPhone 4S, iPhone 4, iPhone 3GS
Re: Tkinter import
« Reply #2 on: September 03, 2012, 09:55:15 pm »
You might try the forum search function. I don't remember seeing an actual tut on it though.
Click for How to Add Our Repo
If you're going to ask questions....
At least make them good ones.

Knowledge is the one thing that can never be taken from you

N33n0Gr33n

  • Full Member
  • ***
  • Posts: 116
  • Reputation: 1
  • Rogue ininja
  • Computers: Dell,HP
  • iDevices: Iphone4,HTC
Re: Tkinter import
« Reply #3 on: September 04, 2012, 04:35:25 pm »
There isn't , just a lot of topics if I find a tut I'll post it.

Ironman

  • Administrator
  • Hero Member
  • *****
  • Posts: 5099
  • Reputation: 251
  • Badges:
  • Computers: ASUS UL50VT
  • iDevices: iPhone 5, iPhone 4S, iPhone 4, iPhone 3GS
Re: Tkinter import
« Reply #4 on: September 04, 2012, 05:57:11 pm »
Learn to use it and make your own original Tut!!
Click for How to Add Our Repo
If you're going to ask questions....
At least make them good ones.

Knowledge is the one thing that can never be taken from you

Don't like seeing ads? Click here to register!