Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42667

Threading within a GUI and OpenCV

Newsgroups comp.lang.python
Date 2013-04-03 06:39 -0700
Message-ID <bca6ed8f-7a14-4545-9282-0e3e215d35a3@googlegroups.com> (permalink)
Subject Threading within a GUI and OpenCV
From Sam Berry <sambez_14@hotmail.co.uk>

Show all headers | View raw


Hey, 

I'm fairly new to python, and have had no experience with threading.

Iv made a small GUI App using the kivy module and OpenCV, i have currently got a button that when pressed runs a function that records from my webcam for 20 seconds.

However i have two other buttons, that when pressed i want to stop the recording. However when the button to record has been pressed the App freezes until the recording function has finished.

I have read that threading can be used to run a function as a deamon? so that other functions can be ran simultaneously?

I was just wondering if this would be the way to go, or if there are alternative routes? 

A snippet from my code can be seen at (http://pastebin.com/9uFRjkgV) with a failed attempt of using threading!

Any help would be appreciated.

Thanks, Sam

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Threading within a GUI and OpenCV Sam Berry <sambez_14@hotmail.co.uk> - 2013-04-03 06:39 -0700

csiph-web