Last active
December 5, 2019 14:39
-
-
Save yasushisakai/143484ce4918de37e63b to your computer and use it in GitHub Desktop.
rhino python sticky sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scriptcontext as sc | |
def hello(): | |
print 'hello' | |
if 'var' not in sc.sticky: | |
sc.sticky['var'] = 0 | |
if 'hello' not in sc.sticky: | |
sc.sticky['hello'] = hello | |
if I: | |
sc.sticky['var']+=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scriptcontext as sc | |
sc.sticky['hello']() | |
O = sc.sticky['var'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment