pythonsudoku-devel Mailing List for Python Sudoku
Brought to you by:
xoseotero
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(10) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
(1) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: darek <he...@po...> - 2009-03-10 13:11:07
|
pl.po file was downloaded from SVN repository (revision 498). |
From: Xosé A. O. F. <xos...@gm...> - 2008-10-06 11:19:21
|
On Friday 26 September 2008 09:52:44 gang chen wrote: > The code of drawing of board for GUI, IMAGE and PDF is almost > duplicate. So should we use some design patter to refactor this? This is a good idea. They draw the board with the same instructions: create lines and write numbers. The difference is the size of the elements (lines, fonts, spaces, etc). > And also the first trying of use this list About this... SF.net had problems with the mailing lists [0] but the mailing list should be ok right now. Btw, do you get 3 e-mails I sent the last week to this list? [0] http://sourceforge.net/community/forum/topic.php?id=3659&page#post-8379 |
From: Xosé A. O. F. <xos...@gm...> - 2008-09-26 19:04:48
|
Hi, I'll begin to rewrite the code, as I advance you in the "help wanted" message. I'm planning to rewrite 2 thinks: the file format and how the sudokus are solved. 1. File format: Currently, the file format that Python Sudoku uses is a plain text file with a optional header setting the size of the sudoku and a list of values. 0 in that list means that the number is not known. I have already wrote a new version of the file format, but still not in subversion, that uses XML to store the information. In the first version only the given numbers and the calculated numbers are set. I'll try to commit the code to work with this format this night. 2. Solver method: If you have read the pythonsudoku/sudoku.py code you'd find that the code is spaghetti code: the 3/4 methods that Python Sudoku already uses are defined inside the Sudoku class with the use of methods inside methods... I'm planning to change the way that the methods are defined. Create a base Method class with a solve() method that tries to calculate new values and a Sudoku class with methods to get the positions of a row/column/region, to set calculate values and to remove possible values. class Sudoku: row(x, y): iterator with the positions of the row column(x, y): iterator with the positions of the column region(x, y): iterator with the positions of the region value(x, y, value): set the value of a position remove_candidate(x, y, value): remove a value from the candidates if there is only one candidate: value(x, y, VALUE) solve(): continue = True while continue: continue = False for method in self.methods: if method.solve(): continue = True create(): brute force as is right now class Method: def solve(): I think this way it will be easier to write new methods. What do you think? Future improvements: -Pass to the methods the changes from the last execution of the method so it's not needed to try to solve all the sudoku. -Show/save the method used to calculate a value or remove a candidate value. 3. Rewrite branch: I'll begin to rewrite the code in the rewrite branch [0]. https://pythonsudoku.svn.sourceforge.net/svnroot/pythonsudoku/pythonsudoku/branches/rewrite As always, any question/idea will be welcomed. |
From: Xosé A. O. F. <xos...@gm...> - 2008-09-26 17:50:47
|
I think the best link to look at methods to solve sudokus is this one [0]. It has the methods divided in families and difficulties. Tell me if you find good links about methods to solve sudokus. [0] http://www.scanraid.com/Strategy_Families |
From: Xosé A. O. F. <xos...@gm...> - 2008-09-26 17:44:56
|
As I was the only developer of the project it was easy to write all the code with the same coding style. Since some days ago the project has grown and a explicit coding style is needed. I was following the coding style set by the python developers [0]. I think this style is very simple to write/read and very used in all python code. [0] http://www.python.org/dev/peps/pep-0008/ |
From: gang c. <che...@gm...> - 2008-09-26 07:52:56
|
Hi, The code of drawing of board for GUI, IMAGE and PDF is almost duplicate. So should we use some design patter to refactor this? And also the first trying of use this list Br, Chen Gang |
From: liang y. <iam...@gm...> - 2008-09-21 09:42:03
|
Thanks Otero. I have commited them. The script is named as "win_convert.sh".It just to change the newline character from unix mode to Dos/windows one. I use an independent(bin_file.cfg) file to discribe the binary file that should not be converted .Because it's easy to process with grep. Ps:It's will be cool if the 1/5 population of the world know our Python Sudoku:) Regards Yuliang |
From: Xosé A. O. F. <xos...@gm...> - 2008-09-21 03:28:45
|
On Sunday 21 September 2008 04:06:59 liang yu wrote: > This is my first mail:)Also to test whether I join the mail list > successfully,so if anybody receive this mail ,please give me a > confirm,thanks. All seems to work well :) (As you know after my previous e-mail! :D) > I am from China(GMT+8). I suppose it for your name, but it's good to know. In Spain we are in GMT+2 (it's a bit late... I know ;)). > I know the newline character in DOS or Windows is "\r\n",but in unix > it's just "\n".To convert it ,you can use sed or just tr command,but after > I tried it i found it didn't work well.So I prefer to use the command > unix2dos(It must be installed in almost every GNU/Linux). I never checked this because I thought that the zip format/program could uncompress the text files in native newline. Funny thing: changing the newline in the subversion of some files I found that some files haven't the property "svn:eol-style" set... |
From: Xosé A. O. F. <xos...@gm...> - 2008-09-21 03:25:28
|
On Sunday 21 September 2008 05:16:05 liang yu wrote: > We can use the following command to convert all the .py file to > windows. > > find <code_dir> -name *.py -exec unix2dos {} \; I was answering your other e-mail! :p As I was writting, we should convert all text files, ie, README, INSTALL, po files, documentation... Something like this: for file in Changelog COPYING* INSTALL MANIFEST.in pysdk.cfg README* setup.* \ TODO doc/*.txt doc/*.html doc/*.css pythonsudoku/*; do unix2dos $file done Could you commit it and test if you have correct access to subversion? Put it in the admin/ directory. |
From: liang y. <iam...@gm...> - 2008-09-21 03:16:25
|
Hi all: We can use the following command to convert all the .py file to windows. find <code_dir> -name *.py -exec unix2dos {} \; |
From: liang y. <iam...@gm...> - 2008-09-21 02:07:12
|
Hi All: This is my first mail:)Also to test whether I join the mail list successfully,so if anybody receive this mail ,please give me a confirm,thanks. I am from China(GMT+8). I know the newline character in DOS or Windows is "\r\n",but in unix it's just "\n".To convert it ,you can use sed or just tr command,but after I tried it i found it didn't work well.So I prefer to use the command unix2dos(It must be installed in almost every GNU/Linux).Also we need a small script to convert the *.py file recursively.I try to do it now. Best Wishes Yuliang |
From: Ted S. <dod...@gm...> - 2008-04-17 19:03:55
|
Hi all, Might there be a way to pass 9 sets of 9 characters to be used as the symbols in a solved sudoku puzzle? It would be even better if there were some way to show both the original 1-9 and the replacement characters at the same time, maybe by having a larger gray number background, with a solid black character foreground. What could this be used for, you're probably wondering? Say you want to print out a password card, with a set of strong passwords that you could use on one or more accounts. But if someone's looking over your shoulder, you don't want it to be obvious which password you're using. Generate 9 strong passwords following a certain pattern. Here's one that I created randomly as an example Qd"4xkD9f that's 2 Uppercase (U), 4 lowercase (l), 2 digits (d), 1 symbol (S). Let's say that you create 9 such passwords, all with the sequence above: UlSdllUdl If you then substitute these 9 passwords into a solved sudoku puzzle, you are guaranteed that *every* 1-9 sequence you find in the square will contain some set of 2U, 4l, 2d, 1S characters. You could then print this out and carry it with you to remember your password. Someone looking over your shoulder wouldn't know which sequence you were using -- all you have to remember is "upper left corner", or "column 6", or even "row 3, using the original order". Nice, eh? The password generation is another problem. But let's say that I handle that myself and pass in the string myself. Is that an easier problem to solve? Ted -- dodecatheon at gmail dot com Frango ut patefaciam -- I break so that I may reveal |
From: <xos...@gm...> - 2006-07-01 19:01:13
|
I've changed the SVN structure. Until now, the SVN was: trunk,branches,tags/modules Since now, the SVN is: module/trunk,branches,tags Note for Olivier: Your branch is in pythonsudoku/branches/ocroquette/ instead of branches/pythonsudoku/ocroquette. I have some problems (mistakes :p) converting you branch and I have to do it in several passes. By the way, are you there? |
From: <xos...@gm...> - 2006-06-29 20:34:08
|
The new version has been released and can be downloaded here: http://prdownloads.sourceforge.net/pythonsudoku/pythonsudoku-0.12.zip?download The main changes is the additon of --difficulty option to set the difficulty, that can be easy, normal or hard. For the release I have deleted the fuzzy strings from the translations, so some translations have not translated strings: 1. Catalonian translation: Line 287: "set the lines colour (\"black\", \"blue\", etc) (\"%s\" is the default for Image and \"%s\" for PDF/Print)" not translated Line 302: "set the font colour for the numbers (\"black\", \"blue\", etc) (\"%s\" is the default for Image and \"%s\" for PDF/Print)" not translated Line 470: "Print command not set" not translated 2. Polish translation: Line 288: "set the lines colour (\"black\", \"blue\", etc) (\"%s\" is the default for Image and \"%s\" for PDF/Print)" not translated Line 303: "set the font colour for the numbers (\"black\", \"blue\", etc) (\"%s\" is the default for Image and \"%s\" for PDF/Print)" not translated Line 470: "Print command not set" not translated 3. German translation: Line 29: "integer" not translated Line 33: "long integer" not translated Line 37: "floating-point" not translated Line 41: "complex" not translated Line 153: "set the difficulty of the sudoku (\"hard\", \"normal\", \"easy\") (\"%s\" is the default)" not translated Line 204: "set the title colour (\"black\", \"blue\", etc) (\"%s\" is the default)" not translated Line 272: "show letters instead of numbers > 9 (default)" not translated Line 276: "show only numbers" not translated Line 280: "show letters instead of numbers > 9" not translated Line 284: "show only numbers (default)" not translated Line 289: "set the lines colour (\"black\", \"blue\", etc) (\"%s\" is the default for Image and \"%s\" for PDF/Print)" not translated Line 304: "set the font colour for the numbers (\"black\", \"blue\", etc) (\"%s\" is the default for Image and \"%s\" for PDF/Print)" not translated Line 449: "This sudoku can be solved." not translated Line 471: "Print command not set" not translated |
From: <xos...@gm...> - 2006-05-30 07:34:55
|
O M=E9rcores 17 Maio 2006 09:55, Xos=E9 Ant=F3n Otero Ferreira escribiu: > I was thinking in create 2 configuration file: > a) a normal configuration file (/etc/pysdk.cfg in UNIX) for configuring > each command line parameter > b) platform.cfg with 4 lines to set where the system configuration is > (/etc/pysdk.cfg), the user configuration (~/.pysdk.cfg), locale dir > (/usr/share/locale) and other param that i forget. > > The problem is... where to put the platform.cfg? The only possible place > that I found was inside the pythonsudoku package (pythonsudoku/*.py and > pythonsudoku/platform.cfg): try to walk the python path for modules > location and find the configuration file there. But this should be the > place for python code only... I've just commited to the SVN this implementation. Right now, PySDK is too unstable for release 0.12 :( |
From: <xos...@gm...> - 2006-05-17 07:55:44
|
Hi Olivier, Too many time since 0.11 version (6 months). I want to release 0.12 soon but I have one problem. I've started to use distutils to make possible package the program. The problem is that this is my first try to make a multiplatform program and I don't know who to make it. I want to make possible that Python Sudoku can be used without instalation: the way it works in 0.11 where you only unzip the file, cd into the directory and execute the script; but also instalable via setup.py. On the other hand, the a installer could let you install the program in any directory and a way to set this directory should be possible. I was thinking in create 2 configuration file: a) a normal configuration file (/etc/pysdk.cfg in UNIX) for configuring each command line parameter b) platform.cfg with 4 lines to set where the system configuration is (/etc/pysdk.cfg), the user configuration (~/.pysdk.cfg), locale dir (/usr/share/locale) and other param that i forget. The problem is... where to put the platform.cfg? The only possible place that I found was inside the pythonsudoku package (pythonsudoku/*.py and pythonsudoku/platform.cfg): try to walk the python path for modules location and find the configuration file there. But this should be the place for python code only... Any idea? Maybe this is a try to do a complicated thing because of stupidity and there is a simple wat to do things, but... how? |
From: <xos...@gm...> - 2006-05-16 14:43:13
|
Hi Mario, I'm (still) planning to release the 0.12 version "soon". Final strings for this release are set. There are new lines and changes (fixes) to old ones. I've added the updated .po file. Changes in de.po: Line 29: "integer" not translated Line 33: "long integer" not translated Line 37: "floating-point" not translated Line 41: "complex" not translated Line 152: "set the difficulty of the sudoku (\"hard\", \"normal\", \"eas y\") (\"%s\" is the default)" fuzzy translation Line 203: "set the title colour (\"black\", \"blue\", etc) (\"%s\" is th e default)" fuzzy translation Line 272: "show letters instead of numbers > 9 (default)" not translated Line 276: "show only numbers" not translated Line 280: "show letters instead of numbers > 9" not translated Line 284: "show only numbers (default)" not translated Line 449: "This sudoku can be solved." not translated |
From: <xos...@gm...> - 2006-05-16 14:09:05
|
O S=E1bado 13 Maio 2006 00:13, he...@po... escribiu: > updated .po file Is in SVN now, thanks. |
From: <xos...@gm...> - 2006-05-13 06:35:40
|
O Venres 12 Maio 2006 20:44, Olivier Croquette escribiu: > I have a strange behaviour under MacOS X. > PySu (I hope you allow me this nick name :) sometimes hangs on startup. > I will try to investigate! I prefer PySDK :p I thing that the hangs are produced by Sudoku::fix() function. The algol for create a sudoku is mainly a brute force one. Sudoku::fix() should fix the board when a incorrect number is added, but sometimes it can't. I've tried some variants of this function (the actual is a very stupid one) but I haven't found a good one. A possibility is don't use this function and if a impossible board is found, restart the creation since the begining. Python Sudoku did that in the firsts versions. A propper Sudoku::fix() is fattest, but the actual one hangs the program. |
From: <he...@po...> - 2006-05-12 22:14:13
|
updated .po file |
From: <xos...@gm...> - 2006-05-09 01:15:50
|
Thanks! It's in SVN now. Since 0.11 some strings have changed (no more string changes until 0.12). Can you update the .po file I send you with the below info? The "fuzzy translation" means that part of a string have changed or there is a new string very similar to a old one. Changes in pl.po: Line 127: "save a sudoku as an image" fuzzy translation Line 136: "Creation and GUI Options" fuzzy translation Line 141: "set the difficulty of the sudoku (\"hard\", \"normal\", \"easy\") (\"%s\" is the default)" fuzzy translation Line 192: "set the title colour (\"black\", \"blue\", etc) (\"%s\" is the default)" fuzzy translation Line 261: "show letters instead of numbers > 9 (default)" not translated Line 265: "show only numbers" fuzzy translation Line 270: "show letters instead of numbers > 9" not translated Line 274: "show only numbers (default)" not translated Line 298: "show the modules not found" not translated Line 347: "Save as _Image" fuzzy translation Line 420: "Save file as an image" fuzzy translation |
From: <xos...@gm...> - 2006-05-08 20:17:08
|
O Luns 08 Maio 2006 21:42, Xos=E9 Ant=F3n Otero Ferreira escribiu: > Thanks! It's in SVN nO Luns 08 Maio 2006 21:42, vostede escribiu: > Can you update the .po file I send you... Oops! And here is the .po file :pow. |
From: <he...@po...> - 2006-05-08 18:00:47
|
.po file |
From: <ser...@o2...> - 2006-05-04 17:34:13
|
confirm 201902 |