Hello, I am pulling a list of files I need to print from a database and I have all the records after doing the sqlalchemy query with .all()
Now I have a list of 3000 files I need to print, around 3 files per userID, I want to print all 3 at the same time in different threads, and my only requirement is that all files are printed for user 1 before we start printing for user 2. Because the process doesn't use full power of the CPU when I print one by one, I want to thread the process so it prints all 3 files at the same time in different threads. When its done it moves on to the next userid. How can I sub query by user Id? results= Session.query(PrintTable).filter(PrintTable.Date='20081120').order_by(PrintTable.Username).all() How can I from above result go to: 1. In a for loop, a. get a list of files for userid=1 (userid=1 files to print file1,file2,file3) b. pass the 3 filenames to a thread function that will print the files c. go to the next userid Any idea how can this be done? I can find some tutorials on threading but I'm not sure how can I subquery to get the 3 file names? Thanks, Lucas -- Turbogears2 Manual http://lucasmanual.com/mywiki/TurboGears2 Bazaar and Launchpad http://lucasmanual.com/mywiki/Bazaar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---