Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
Hey, I have recently switched from Tkinter to wxPython, because after reading several comments on that topic I came to the conclusion that this might be a good idea.
In order to keep the GUI responsi... |
|
Zatox11 |
GUI |
33 |
26,202 |
Apr-10-2018, 09:03 AM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
*** UPDATE v2 ***
- .exe file working
- added backtrack counter
- added "stopwatch"
# SudokuSolver_solver.py
BACKTRACK_COUNTER = 0
def do_solve(sudoku):
status = wsolve(sudoku)
return stat... |
|
Zatox11 |
GUI |
33 |
26,202 |
Apr-03-2018, 02:58 PM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
Thank you very much. calling freeze_support() function prevents tkinter from being stuck in an endless loop when running the program via .exe file. |
|
Zatox11 |
GUI |
33 |
26,202 |
Apr-03-2018, 10:50 AM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
Thanks, renaming the mainfuntion to .pyw works just fine. However I wanted to create an .exe file which runs on computers that don't have Python installed. I found "pyinstaller" and it basically did e... |
|
Zatox11 |
GUI |
33 |
26,202 |
Apr-02-2018, 04:07 PM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
*** UPDATES ***
- save function checks wether sudokufile dir already exists. if not -> makedir
- filepaths should be platform independent
- init function can now handle cases: where there are non ... |
|
Zatox11 |
GUI |
33 |
26,202 |
Apr-02-2018, 12:58 PM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
Okay, I have split my code into 4 files:
1. main function:
# SudokuSolver_main.py
import SudokuSolver_class as Sudokuolver
from tkinter import *
def main():
root = Tk()
app = Sudokuolver.Su... |
|
Zatox11 |
GUI |
33 |
26,202 |
Apr-01-2018, 11:38 AM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
Yes it works! **dance** Now I have to implement this into my GUI. GL me |
|
Zatox11 |
GUI |
33 |
26,202 |
Mar-31-2018, 02:15 PM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
No, it does not write "Found!" in the GUI. I was running the program in IDE before. When I run the program from a cmd window I get the following error msg when I press Solve Sudoku:
[Image: https://ab... |
|
Zatox11 |
GUI |
33 |
26,202 |
Mar-31-2018, 10:48 AM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
Yes, when I run solvesudo.py alone, I get "solution found" after a few seconds.
When I put tksudo.py code in if __name__ == '__main__' block, I dont get a second instance of the root window anymore by... |
|
Zatox11 |
GUI |
33 |
26,202 |
Mar-31-2018, 10:23 AM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
I have 3 files:
1. solvesudo.py - your code
2. tksudo.py - your code
3. tkcallasync.py - code from active state recipe
When I run tksudo.py the root window shows up. Then I click on "Solve Sudoku" an... |
|
Zatox11 |
GUI |
33 |
26,202 |
Mar-31-2018, 09:18 AM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
Hi, thanks for your help. Unfortunately the code doesnt seem to work on windows. When I press "Solve Sudoku" another instance of tkinter shows up. By pressing it again he says that its still calculati... |
|
Zatox11 |
GUI |
33 |
26,202 |
Mar-31-2018, 08:46 AM |
|
|
Thread: calculate the 10001st prime number
Post: RE: calculate the 10001st prime number
thanks, these two improvements actually make a lot of difference in performance.
improved code:
def calcPrim(number):
primList = []
primList.append(2)
value = 3
while len(primList) <... |
|
Zatox11 |
Homework |
7 |
6,346 |
Mar-30-2018, 07:04 PM |
|
|
Thread: calculate the 10001st prime number
Post: RE: calculate the 10001st prime number
I am not 100% sure if that is exactly what you want, but here:
def calcPrim(number):
primList = []
primList.append(2)
value = 3
while len(primList) < number:
if checkPrim(pr... |
|
Zatox11 |
Homework |
7 |
6,346 |
Mar-30-2018, 05:30 PM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
Yes, sure...
sudoku = [[' ',' ',' ','2','1',' ',' ',' ',' '],
[' ',' ','7','3',' ',' ',' ',' ',' '],
[' ','5','8',' ',' ',' ',' ',' ',' '],
['4','3',' ',' ',' ',' ',' ',... |
|
Zatox11 |
GUI |
33 |
26,202 |
Mar-30-2018, 03:32 PM |
|
|
Thread: tkinter freezes by clicking button
Post: RE: tkinter freezes by clicking button
I have rearranged my program according to "full example from zetcode":
function called when "solve" is pressed
def solveSUDOKU(self):
self.getinput(self.sudoku) # get user input from GU... |
|
Zatox11 |
GUI |
33 |
26,202 |
Mar-30-2018, 02:31 PM |
|
|
Thread: tkinter freezes by clicking button
Post: tkinter freezes by clicking button
Hi,
I am new to Python and programming in general. What I want to do is build a kind of "sudoku-solver" which is capable of doing the following tasks:
- let the user enter a random sudoku
- solve the... |
|
Zatox11 |
GUI |
33 |
26,202 |
Mar-30-2018, 11:38 AM |