- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
This is my custom module: [CODE]class Player(object): def __init__(self, name, score = 0): self.name = name self.score = score def __str__(self): rep = self.name + ":\t" + str(self.score) return rep def ask_yes_no(self, question): response = None while response not in ("y", "n"): response = input(question).lower() return response def ask_number(self, question, … |
|
Hello, I was testing a class in a GUI, and that error message showed up. Please help. Code: [CODE]from Tkinter import * class Application(Frame): def __init__(self, master): super(Application, self).__init__(master) self.grid self.create_widgets() def create_widgest(self): self.bttn1 = Button(self, text = "I do nothing!") self.bttn1.grid() self.bttn2 = Button(self, text = "Me too.") self.bttn2.grid() … |
|
The GUIFlowLayout is giving me some trouble, the GUIFrame works fine. I have copied this from the Java programming book which I am using (Introduction to JAVA, eight edition, by Y. Daniel Liang). I get red error lines under 'setLayout', all of the 'add' words, and all the 'setTitle, setSize' … |
|
I just finished a program, it worked perfectly, then I changed a bit of it, and now it won't work at all, even if I change it back. [CODE]self.secret_txt = Text(self, width = 35, height = 5, wrap = WORD).grid(row = 3, column = 0, columnspan = 2, sticky = … |
|
[CODE]print "creating a text file" text_file = open("write_it.txt", "a") score = 5 name = raw_input("What's your name?: ") score = (score, name) text_file.write(score) text_file.close()[/CODE] getting TypeError: expected a character buffer object Please help. Thanks |