Skip to content

Instantly share code, notes, and snippets.

@ivogrig
Created June 23, 2015 09:26
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 ivogrig/093b776fb7be608a26a8 to your computer and use it in GitHub Desktop.
Save ivogrig/093b776fb7be608a26a8 to your computer and use it in GitHub Desktop.
Modo Monitor example
import time
import lx
dialog_svc = lx.service.StdDialog()
# Allocate monitor
mon = lx.object.Monitor(dialog_svc.MonitorAllocate('Calculating Center Of Mass ...'))
steps = 50
mon.Initialize(steps)
for i in range(steps):
time.sleep(0.1)
try:
mon.Increment(1)
except:
print "The monitor was aborted"
break
# Deallocate monitor
dialog_svc.MonitorRelease()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment