[Tkinter-discuss] tkSnack record for specific period of time

skizm shawn.meier at gmail.com
Tue Jan 19 00:57:06 CET 2010


I am currently trying to write a code snippet that will record for a set
period of time and I have tried a number of methods to do this yet none have
worked, the first one I tried is listed below.

from Tkinter import *
import time
root = Tk()

import tkSnack
tkSnack.initializeSnack(root)
c = tkSnack.Sound()
c.record()
time.sleep(5) #record for 5 seconds
c.stop()

This produces an apparently empty sound file, I assume that what is going on
here is that the sleep command pauses the entire program including what I am
trying to record.  I am sure that there is some proper way to do this but
after searching for quite a while I am at a loss as to what it may be.  In
addition to the sleep I have tried the .after(...) member function of the
master object.  I have tried this with a record and stop button and it works
fine.

Thank you for your help.
-- 
View this message in context: http://old.nabble.com/tkSnack-record-for-specific-period-of-time-tp27218833p27218833.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.



More information about the Tkinter-discuss mailing list