- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
4 Posted Topics
Re: WrongPosition method is not needed here. Try with these two methods.[CODE]def inWord(computerWord, userWord): # Determine what letters are in the correct position # make copies realWord= list(computerWord) # make copies guess= list(userWord) # iterate based on the shortest list length for i in range(min(len(realWord), len(guess))): # If the letter is … | |
Re: Use like this [CODE]file = open('Blueprints.txt','a') file.write('world.setBlockWithNotify(i ') file.write('X') file.write(', j ') file.write('Y') file.write(', k ') file.write('Z') file.write(', Block.') file.write('B') file.write('.blockID);') file.write('\n') file.close()[/CODE] | |
Re: try this def __init__(self, x = 1 , y = 1): | |
Re: Try this [CODE]from Tkinter import * from tkFileDialog import * class Open(Frame): def __init__(self,root): Frame.__init__(self,root) self.grid() self.buttonvar = [] self.button() def button(self): button = [] for x in range(5): button.append([]) self.buttonvar.append([]) for y in range(5): self.buttonvar[x].append(StringVar()) self.buttonvar[x][y].set('') button[x].append([]) button[x][y] = Button (self, textvariable = self.buttonvar[x][y]) button[x][y].bind("<Button-1>",self.open_file) button[x][y].grid(row=x,column=y) def open_file(self,event): file … |
The End.