summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2008-12-21 19:04:49 (GMT)
committer Jaromil <jaromil@dyne.org>2008-12-21 19:04:49 (GMT)
commit1ecc07b294c344bfd2f0bdc47aa4b8e67ea5a31b (patch)
treecd40fe4c29b9f8e6fb33cbff80ff3cb31c9e23af
parent8736f058f39ad6ca26b7a7d7b657f39136d5f30a (diff)
updated example with threading
-rw-r--r--freej/.gitignore7
-rw-r--r--freej/python/playeffect.src18
2 files changed, 14 insertions, 11 deletions
diff --git a/freej/.gitignore b/freej/.gitignore
new file mode 100644
index 0000000..65c9933
--- /dev/null
+++ b/freej/.gitignore
@@ -0,0 +1,7 @@
+EN/freej-manual-EN.pdf
+EN/freej-manual-EN.sgml
+EN/html/
+EN/images/
+EN/index.sgml
+EN/python.sgml
+EN/ruby.sgml
diff --git a/freej/python/playeffect.src b/freej/python/playeffect.src
index fe2dd3b..0e49b4d 100644
--- a/freej/python/playeffect.src
+++ b/freej/python/playeffect.src
@@ -1,4 +1,4 @@
-
+import threading
import freej
import time
import sys
@@ -8,15 +8,11 @@ cx.init(400,300,0,0)
cx.plugger.refresh(cx)
-lay = freej.create_layer(cx,sys.argv[1])
-
-lay.add_filter(cx.filters["vertigo"])
-
+lay = cx.open(sys.argv[1])
+filt = cx.filters["vertigo"]
+lay.add_filter(filt)
+lay.active = True
cx.add_layer(lay)
-# main loop
-while True:
- cx.cafudda(1.0)
- time.sleep(0.04)
-time.sleep(10)
-
+th = threading.Thread(target = cx.start , name = "freej")
+th.start();