[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24728] trunk/blender/release/scripts/ templates/gamelogic.py: patch from Ronan Bignaux
Campbell Barton
ideasman42 at gmail.com
Sat Nov 21 18:41:09 CET 2009
Revision: 24728
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24728
Author: campbellbarton
Date: 2009-11-21 18:41:09 +0100 (Sat, 21 Nov 2009)
Log Message:
-----------
patch from Ronan Bignaux
use python3 print()
Modified Paths:
--------------
trunk/blender/release/scripts/templates/gamelogic.py
Modified: trunk/blender/release/scripts/templates/gamelogic.py
===================================================================
--- trunk/blender/release/scripts/templates/gamelogic.py 2009-11-21 17:22:03 UTC (rev 24727)
+++ trunk/blender/release/scripts/templates/gamelogic.py 2009-11-21 17:41:09 UTC (rev 24728)
@@ -24,23 +24,23 @@
# Some example functions, remove to write your own script.
# check for a positive sensor, will run on any object without errors.
- print 'Logic info for KX_GameObject', own.name
+ print('Logic info for KX_GameObject', own.name)
input = False
for sens in cont.sensors:
# The sensor can be on another object, we may want to use it
own_sens = sens.owner
- print ' sensor:', sens.name,
+ print(' sensor:', sens.name, end=' ')
if sens.positive:
- print '(true)'
+ print('(true)')
input = True
else:
- print '(false)'
+ print('(false)')
for actu in cont.actuators:
# The actuator can be on another object, we may want to use it
own_actu = actu.owner
- print ' actuator:', actu.name
+ print(' actuator:', actu.name)
# This runs the actuator or turns it off
# note that actuators will continue to run unless explicitly turned off.
@@ -58,9 +58,9 @@
# Loop through all other objects in the scene
sce = GameLogic.getCurrentScene()
- print 'Scene Objects:', sce.name
+ print('Scene Objects:', sce.name)
for ob in sce.objects:
- print ' ', ob.name, ob.worldPosition
+ print(' ', ob.name, ob.worldPosition)
# Example where collision objects are checked for their properties
@@ -72,7 +72,7 @@
if ob.has_key('life'):
own['life'] += ob['life']
ob['life'] = 0
- print own['life']
+ print(own['life'])
"""
main()
More information about the Bf-blender-cvs
mailing list