Created
June 23, 2015 09:26
-
-
Save ivogrig/093b776fb7be608a26a8 to your computer and use it in GitHub Desktop.
Modo Monitor example
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 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