Tagged Questions
0
votes
1answer
10 views
python ftplib transfercmd() BINARY Mode
in the absence of an answer to my previous question.
I am using multihtreading to keep a large FTP transfer alive via the control socket.
Unfortuantely this requires the use of ...
0
votes
1answer
17 views
Python threading only launching one extra thread
import socket
import thread
s = socket.socket(
socket.AF_INET, socket.SOCK_STREAM)
s.connect(("server", 6661))
def recv():
while 1:
print(s.recv(1024))
def send():
while 1:
...
1
vote
1answer
16 views
How to use a separate thread for asynchronous signal handling in python
Below is my test code.
When running with python2.7 it shows that the program won't receive any signal until all spawned threads finish.
While with python3.2, only the main thread's sigintHandler gets ...
4
votes
2answers
56 views
How Do I Queue My Python Locks?
Is there a way to make python locks queued? I have been assuming thus far in my code that threading.lock operates on a queue. It looks like it just gives the lock to a random locker. This is bad for ...
2
votes
1answer
37 views
Python return value from scheduled event
I would like to get the value returned from a function called by a scheduled event. Below is a simple example of what I would like to do.
import time
import sched
schedule = ...
1
vote
1answer
29 views
multi threading in python
I have a program or function printValue() that prints some value. But it takes some time(say 5 min) to execute the function. So, How can I implement multithreading or some technique in python so that ...
0
votes
0answers
17 views
Removing print, make the app crash on multithread app
I was reading about Python thread tutorial, from Threads in Python, please note that the asterics marked lines. If I run more than one thread and comment the marked lines, the program crashes ...
1
vote
0answers
16 views
Memcache client with connection pool for Python?
python-memcached memcache client is written in a way where each thread gets its own connection. This makes python-memcached code simple, which is nice, but presents a problem if your application has ...
2
votes
0answers
16 views
Plotting with matplotlib in threads
I know there are quite some questions on matplotlib and threading, also that pyplot is not threadsave. I couldn't find anything on this particular problem however. What I want to do is: plot a figure ...
1
vote
2answers
40 views
Python program with thread can't catch CTRL+C
I am writing a python script that needs to run a thread which listens to a network socket.
I'm having trouble with killing it using ctrl-c using the code below:
#!/usr/bin/python
import signal, ...
0
votes
1answer
19 views
Openerp Timer task using python Threads
Please can anyone give me a example for OpenERP [python] threads.
my requirement is Need to read attendance [text based file] hourly and store it and backup
i searched in forums & workspace also ...
0
votes
1answer
39 views
Execute multi threaded program in Python to run as single thread
I've been using threading class alot in my Python codes and have successfully make a couple routine to run as multi-threaded. The problem is when something fails, it becomes a pain when it comes to ...
0
votes
0answers
31 views
Without the join method from the Thread class, how to block the calling thread without blocking event handlers? Python Tkinter Timer
Well guys, sorry for the thread's title. It's kind of confusing but I think it's gonna be easier to understand what I'm trying to do with this
from Tkinter import *
from threading import Timer
class ...
1
vote
1answer
17 views
Pool.map just hangs — how to do exception handling
I have the following code:
pool = Pool(10)
pool.map(run_update_procedure, titles_to_update)
Sometimes the pool.map will only work on about 18 of the 20 titles above. This causes the program to ...
0
votes
3answers
53 views
How to run max 10 threads in one time?
I want to make 1000 request to a single serwer.
I use threading modul but server block me.
How to set thread that run only max 10 thread in one time (form a list of 1000)?