Hi all, due to my interest in Freecell and related Solitaires research (see http://fc-solve.shlomifish.org/ ) I have found PySolFC - a suite of Solitaire games written in Python) to be useful, and I also enjoy using it to play some Solitaire games or discover new ones. You can find it here - http://pysolfc.sourceforge.net/ .
In the past I was very impressed from the fact that its code was able to implement a (slightly) different type of solitaire in less than 10 lines of Python class inheritance, but as I discovered recently, it was not a talith that was completely azure. Recently I've been trying to process the PySolFC saved games (which are using Pickle) in hope to do some stuff such as reconstruct fake saved games from fc-solve solutions or check saved games for validity. However, after copying and pasting one module into a separate script, it failed with an error. As it turns out, one could not import each module individually and expect it to work, which I was told is frowned upon in Python too. So I set out to remedy it. I was eventually able to remedy it (along with automated tests using the Python TAP.Simple TAP emitter), but discovered some stuff. 1. If foo/__init__.py was present then all subsequent imports of foo.something would go to the cached path. This tripped me for some hours. 2. I could not find a command line flag equivalent to gcc's -I or perl's -I and had to use PYTHONPATH="$(pwd)/pysollib:.../...." . Now my script works and emits some YAML which I can use to try to make sense of it (the JSON emitter refused to emit classes). But it was time consuming. One thing I recall was that Moshe Zadka once told us that "the difference between someone who doesn't know Python and someone who does is 2 hours". However, I have invested much more than that in learning and writing Python and there are still some things that throw me off and keep me busy for hours to solve a simple problem. Perhaps Joel Spolsky was right in http://www.joelonsoftware.com/articles/LordPalmerston.html , and even Python now requires some expertise. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Understand what Open Source is - http://shlom.in/oss-fs There was one Napoleon, one George Washington, and one me! — Big Boy Caprice in http://en.wikiquote.org/wiki/Dick_Tracy_%281990_film%29 Please reply to list if it's a mailing list post - http://shlom.in/reply . _______________________________________________ Python-il mailing list [email protected] http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
