On Jun 29, 2009, at 4:42 PM, Tim Bohmann wrote:
Tom,
Thanks for contributing a solver to David Bau's maze generator. I'm curious to know if I can run the file you created as a standalone program with the python interpreter. I am interested in having it run on my windows machine without having to create a web page. Is this possible? I'm sure it is, but I have little experience using python.
Thanks,
Tim Bohmann San Antonio, TX
Hi Tim,
It should be possible to run pymaze on windows. You will need to download the ReportLab PDF Library for whichever version of python you are running. http://www.reportlab.org/downloads.html
I run it on Mac OS X (UNIX-like) like this:
python pymaze_with_soln.py --cross=0 --curve=0 --solve=1 --cell=10 > foo.pdf
"cell" is the size of cells in "points", with the default setup of 8.5 x 11 inch page with 72 points per inch and 36 point margins. The other options (cross, curve, solve) are boolean flags with 0 false and 1 true. See the source file for other possible command-line options. David Bau programmed all the options - I only added "solve" - and made it so you could call it from a browser or the command-line. I am not sure how to redirect a file in Windows... the program outputs to stdout but you could probably edit it to save to a named file instead.
Have fun!
- Tom
python -u pymaze_with_soln.py --cross=0 --curve=0 --solve=1 --cell=10 > foo.pdf