|
From: Chris L. <chr...@sp...> - 2006-12-12 17:00:45
|
trying the following example code on windows XP with:
>>> import sys
>>> sys.version
'2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)]'
>>> import visual
>>> visual.version
(4, 'beta5')
>>>
The label does not edit....? is this to be expected?
prose = label() # initially blank text
while 1:
if scene.kb.keys: # is there an event waiting to be processed?
s = scene.kb.getkey() # obtain keyboard information
if len(s) == 1:
prose.text += s # append new character
elif (s == 'backspace' or s == 'delete') and len(prose.text) > 0:
prose.text = prose.text[:-1] # erase one letter
elif s == 'shift+delete':
prose.text = '' # erase all the text
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.16/582 - Release Date: 11/12/2006
|