version is ['1.1', 'glowscript']

8 views
Skip to first unread message

Bruce Sherwood

unread,
Mar 24, 2015, 11:42:39 PM3/24/15
to glowscri...@googlegroups.com
In classic VPython the variable "version" has this form: ['6.11', 'release']

Now in GlowScript the variable "version" has this form: ['1.1', 'glowscript']

This means that you could do something like the following, if you found, say, that the scaling wasn't exactly the same in the two environments:

if version[1] == 'glowscript':
    scene.range = 0.45
else:
    scene.range = 0.55

With this scheme the same program can run appropriately in both classic and GlowScript modes.

Reply all
Reply to author
Forward
0 new messages