Skip to content

Instantly share code, notes, and snippets.

@soulslicer
Created June 13, 2015 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soulslicer/ffe9b6e710d2ef56e4af to your computer and use it in GitHub Desktop.
Save soulslicer/ffe9b6e710d2ef56e4af to your computer and use it in GitHub Desktop.
from pyquery import PyQuery as pq
from PyQt4 import QtCore
import multiprocessing
import time
data = (
['a', '2'],
)
def mp_worker((inputs, the_time)):
print "start URL"
e = pq("http://www.google.com/")
urls = [i for i in e.items('a')]
def mp_handler():
p = multiprocessing.Pool(2)
p.map(mp_worker, data)
if __name__ == '__main__':
mp_handler()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment