... | ... | @@ -325,21 +325,21 @@ import sys |
|
|
import time
|
|
|
from threading import Event
|
|
|
|
|
|
// Init the app.
|
|
|
# Init the app.
|
|
|
cameopy.This.init(sys.argv)
|
|
|
|
|
|
// Shared variable.
|
|
|
# Shared variable.
|
|
|
stopping = Event()
|
|
|
|
|
|
// Define the stop handler.
|
|
|
# Define the stop handler.
|
|
|
def stop():
|
|
|
print("Stop handler executed")
|
|
|
stopping.set()
|
|
|
|
|
|
// Register the handler.
|
|
|
# Register the handler.
|
|
|
cameopy.This.handleStop(stop)
|
|
|
|
|
|
// Loop until stop is triggered.
|
|
|
# Loop until stop is triggered.
|
|
|
while not stopping.is_set():
|
|
|
time.sleep(0.1)
|
|
|
```
|
... | ... | |