Skip to content

Instantly share code, notes, and snippets.

@yasushisakai
Last active December 5, 2019 14:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yasushisakai/143484ce4918de37e63b to your computer and use it in GitHub Desktop.
Save yasushisakai/143484ce4918de37e63b to your computer and use it in GitHub Desktop.
rhino python sticky sample
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
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