Update of /cvsroot/freevo/kaa/webinfo/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11044/test

Added Files:
        coversearch.py 
Log Message:
Make a new version of the HTTPReader based completly on threads.
Doing so makes it possible to use the whole power of urllib (e.g. ssl).
But I'm not sure this is the way to go. But it works and is based in
kaa.notifier and Signals. 


--- NEW FILE: coversearch.py ---

from kaa import main
from kaa.webinfo.audio.cdcover import CDCoverGrabber

def exception(e):
    print e

def done(results):
    for r in results:
        print r
        print

def print_status(s):
    print s
    
def print_progress(pos, length):
    if length:
        print pos, length, 100 * float(pos) / length
    else:
        print pos, length

def start_next_search(*args):
    i.search_by_keyword('Enya Only', 'music')

i = CDCoverGrabber()
i.signals['completed'].connect(done)
i.signals['exception'].connect(exception)
i.signals['progress'].connect(print_progress)
i.signals['status'].connect(print_status)

i.signals['completed'].connect_once(start_next_search)

i.search_by_artist('Enya')



main()



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to