@

Home 

python Programming Glossary: queue.queue

Python on Windows - how to wait for multiple child processes?

http://stackoverflow.com/questions/100624/python-on-windows-how-to-wait-for-multiple-child-processes

but here it goes import Queue thread subprocess results Queue.Queue def process_waiter popen description que try popen.wait finally..

Processing single file from multiple processes in python

http://stackoverflow.com/questions/11196367/processing-single-file-from-multiple-processes-in-python

result in_queue.task_done if __name__ __main__ work Queue.Queue results Queue.Queue total 20 # start for workers for i in xrange.. if __name__ __main__ work Queue.Queue results Queue.Queue total 20 # start for workers for i in xrange 4 t threading.Thread..

Tkinter locks python when Icon loaded and tk.mainloop in a thread

http://stackoverflow.com/questions/1198262/tkinter-locks-python-when-icon-loaded-and-tk-mainloop-in-a-thread

thread from time import sleep import Queue request_queue Queue.Queue result_queue Queue.Queue def submit_to_tkinter callable args.. sleep import Queue request_queue Queue.Queue result_queue Queue.Queue def submit_to_tkinter callable args kwargs request_queue.put..

How can I tail a log file in Python?

http://stackoverflow.com/questions/12523044/how-can-i-tail-a-log-file-in-python

implementation import threading Queue subprocess tailq Queue.Queue maxsize 10 # buffer at most 100 lines def tail_forever fn p..

Mutli-threading python with Tkinter

http://stackoverflow.com/questions/14379106/mutli-threading-python-with-tkinter

yield this thread. root Tkinter.Tk running True queue Queue.Queue app App queue app.create_moving_ball app.canvas.bind ' Destroy..

How to connect a progress bar to a function?

http://stackoverflow.com/questions/15323574/how-to-connect-a-progress-bar-to-a-function

def __init__ self master self.master master self.queue Queue.Queue self.gui GuiPart master self.queue self.running True threading.Thread.. App tk.Tk def __init__ self tk.Tk.__init__ self self.queue Queue.Queue self.listbox tk.Listbox self width 20 height 5 self.progressbar..

Return value from thread

http://stackoverflow.com/questions/1886090/return-value-from-thread

share improve this question I suggest you instantiate a Queue.Queue before starting the thread and pass it as one of the thread's..

Catch a thread's exception in the caller thread in Python

http://stackoverflow.com/questions/2829329/catch-a-threads-exception-in-the-caller-thread-in-python

Exception self.bucket.put sys.exc_info def main bucket Queue.Queue thread_obj ExcThread bucket thread_obj.start while True try..

python multithreading for dummies

http://stackoverflow.com/questions/2846653/python-multithreading-for-dummies

.read theurls '''http google.com http yahoo.com'''.split q Queue.Queue for u in theurls t threading.Thread target get_url args q u..

How do I get a thread safe print in Python 2.6?

http://stackoverflow.com/questions/3029816/how-do-i-get-a-thread-safe-print-in-python-2-6

own and handle sys.stdout communicate to it via Queue.Queue isn't all that useful since the problem is not thread safety..

Python urllib2.urlopen() is slow, need a better way to read several urls

http://stackoverflow.com/questions/3472515/python-urllib2-urlopen-is-slow-need-a-better-way-to-read-several-urls

s' len data url queue.put data def fetch_parallel result Queue.Queue threads threading.Thread target read_url args url result for.. threads t.join return result def fetch_sequencial result Queue.Queue for url in urls_to_load read_url url result return result Best..

How can I speed up fetching pages with urllib2 in python?

http://stackoverflow.com/questions/3490173/how-can-i-speed-up-fetching-pages-with-urllib2-in-python

args def run_parallel_in_threads target args_list result Queue.Queue # wrapper to collect return value in a Queue def task_wrapper.. 0.00 s sys 0.00 s total 0.00 s Wall time 0.00 s Out 275 Queue.Queue instance at 0x038B2878 In 276 time run_parallel_in_threads dummy_task..

Tkinter: Wait for item in queue

http://stackoverflow.com/questions/7141509/tkinter-wait-for-item-in-queue

top.after 100 on_after_elapsed top Tk.Tk dataQ Queue.Queue maxsize 0 f Font family 'Courier New' size 12 scrText ScrolledText..

Python imaging library show() on Windows

http://stackoverflow.com/questions/8932976/python-imaging-library-show-on-windows

is the relevant portion of the code def main link_queue Queue.Queue image_queue Queue.Queue links get_image_links 'test_search'.. of the code def main link_queue Queue.Queue image_queue Queue.Queue links get_image_links 'test_search' for link in links link_queue.put..