*********************************************************************** Following information is being supplied with the XO/ Sugar(-ized) version of BrGoGo, which in turn is the Python version of the "Monitor" program created for MS Windows OS. Any utility scripts provided are intended for use in preparing a Sugar Activity bundle for deployment or to assist debugging on actual XO machines. They are *not* intended for any other purpose and care should taken if used for any other purpose. No responsibility is accepted for any damage caused by these scripts in normal use or otherwise. *********************************************************************** PLY - Python Lex-Yacc (http://www.dabeaz.com/ply/ply.html) PLY is used to create the Logo compiler element of GoGo and does it's magic in part by extracting Python doc-strings. If Python on the target machine (such as OLPC laptops) is compiled or run with the "-OO" optimisation option then doc-strings are stripped and PLY complains, gasps and dies a horrible death. To get around this PLY provides "optimize" options for Lex and Yacc, which can now be set in pyYacc.py in the function analisarCodigo(). To avoid problems on the target machine any dynamically created *.py/ *.pyc files must be created on a machine with a non-optimising version of Python. In pratice this means running the application code and then running it a second time, since on the first run PLY dynamically creates lextab.py and parsetab.py and, to be safe, we also want the *.pyc versions of these as well. See the URL above for more detailed and specific information. Dynamically created files can be simply generated by running the full application (remember - twice!). Alternatively some utility scripts have been supplied to exercise just the Logo compiler code (without requiring an actual GoGo board): clean.sh Deletes *all* dynamically created files. Run *only* from the main application directory (in fact it checks if the current directory is named "GoGo.activity" and aborts if not). py-docstring-test.py Tests if Python is stripping doc-strings. Run from the terminal using "python py-docstring-test.py". compiler-test.py Exercises just the Logo compiler code and in the process triggers the generation of *.pyc files and dynamically created *.py. A second run is required to get all *.pyc files associated with the Logo compiler. rebuild-compiler.sh Packages all the above for your convenience.