From da2db4bc587f94ecb5e4501f87bd0fb57a64e3f4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 21 Nov 2009 17:41:09 +0000 Subject: [PATCH] patch from Ronan Bignaux use python3 print() --- release/scripts/templates/gamelogic.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/release/scripts/templates/gamelogic.py b/release/scripts/templates/gamelogic.py index 8bfe799bacf..0d1bc7fa29d 100644 --- a/release/scripts/templates/gamelogic.py +++ b/release/scripts/templates/gamelogic.py @@ -24,23 +24,23 @@ def main(): # 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 @@ def main(): # 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 @@ def main(): if ob.has_key('life'): own['life'] += ob['life'] ob['life'] = 0 - print own['life'] + print(own['life']) """ main()