Blender Git Loki
Git Commits -> Revision edcb9f8
Revision edcb9f8 by Campbell Barton (master) May 29, 2009, 09:22 (GMT) |
workaround for strange python problem in the BGE and BPy API where printing warnings mistook the blender binary for a script - argv[0], Binary lines were printed into the console sometimes causing console beeps and corrupting future console output. Internal texts file on disk is not used it seems python warnings dont support this (even though exceptions do). The most common cause of this is passing a float as an argument to a method that took an int. get around this by setting __file__ in the namespace to the script name before executing the script, the file lines are not found but at least the output is not weird and confusing. Added read only 'mode' attribute to the python controller so there is a way to tell if its executing a module or a script. Updated docs to better explain execution methods. |
Commit Details:
Full Hash: edcb9f88635a130dbf342ce5203b5357e306577c
SVN Revision: 20493
Parent Commit: 3917701
Lines Changed: +23, -6