1
vote
1answer
36 views

Python time of trying to open page with opener

I am trying to open multiple pages using threading. When I use a single thread, all is OK, but when using two or more threads, I receive a timeout response. My code: opener = ...
0
votes
1answer
38 views

Python: how to achieve setinterval function without thread?

I want when a function execute finsish, before the next function execute it could wait some time and I know the setinterval or settimeout effect could achieve through multithreading or somthing but ...
0
votes
1answer
25 views

No JSON object could be decoded. Threading Python

I've been trying to make multiple HTTP request using threading. First, I have a method that calls to an API, and that method takes a dict as an argument and returns a JSON object. Additionally, it ...
0
votes
1answer
22 views

Python web crawler multithreading and multiprocessing

Briefly idea, My web crawler have 2 main jobs. Collector and Crawler, The collector will collecting all of the url items for each sites and storing non duplicated url. The crawler will grab the urls ...
0
votes
1answer
41 views

killing a thread in python before its done

I did a little search and found out there is no way to kill a thread in python, but how would one solve a problem like me ? I have a function that sets X to True for one hour and after that it sets ...
0
votes
0answers
30 views

independent simultaneous input

In my python code I want to read data from a serial port as well as take input from the user through a keyboard.the data from the serial port and the keyboard can come at any time and are independent ...
1
vote
1answer
16 views

How does one make a twistedmatrix subprocess continue processing after the client disconnects?

I`m creating a twisted tcp server that needs to make subprocess command line call and relay the results to the client while still connected. But the subprocess needs to continue running until it is ...
0
votes
1answer
41 views

QT Timers not calling function

I'm using PyQt with Python3. My QTimers are not calling the function they're told to connect to. isActive() is returning True, and interval() is working correctly. The code below (works standalone) ...
-2
votes
0answers
40 views

How to do multi-thread in reactor method in python? [on hold]

I want to create group of 20 threads in python, and when i need a thread, i take one thread from the group of the 20 threads, and when i finish with him, i return him to the group . Someone can give ...
1
vote
1answer
20 views

Architechture of multi-threaded program using database

I've got a fairly simple Python program as outlined below: It has 2 threads plus the main thread. One of the threads collects some data and puts it on a Queue. The second thread takes stuff off the ...
1
vote
2answers
42 views

Python thread blocking further execution

I have been trying to write a python script that initiates a thread to listen on a socket and send HTTP data to another application to be launched by the same program. There is a requirement for the ...
-1
votes
1answer
38 views

multi threading in python using text file

let's say am having text list containing aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn ooo ppp qqq rrr sss ttt uuu i want to write python code to get 5 lines each time and apply specific ...
3
votes
5answers
79 views

in python, how to wait until only the first thread is finished

The requirement is to start 5 thread, and wait only the fastest thread. All 5 threads went to look for the same data 5 directions, and one is enough to continue the control flow. Actually, I need to ...
0
votes
1answer
42 views

Threading in python: daemon.start() eat 20% of my crawler time. Why?

I'm looking around about threading to develop cool easy web crawler, but it works so slowly. Here is a fragment of code I found in ibm library: urls = [] # huge list of urls in_queue = ...
1
vote
3answers
77 views

How to let a Python thread finish gracefully

I'm doing a project involving data collection and logging. I have 2 threads running, a collection thread and a logging thread, both started in main. I'm trying to allow the program to be terminated ...
0
votes
0answers
17 views

Shut down SocketServer on SIG*

I'm confused as to how to properly shut down a very simple server that I'm using. I was thinking that this should be enough: #!/usr/bin/python import signal import myhandler import SocketServer ...
0
votes
1answer
18 views

Compile thread-safe tcl for python on Windows

I'm doing a project with Python and I need to put something in thread. It turned out that if you do something that uses Tk in thread, it will somehow crash. The error is: TclError: out of stack ...
1
vote
1answer
48 views

Python: Threads stopping without any reason

I am trying to make a hash breaking application that will check all the lines of one file with all the lines in the rockyou dictionary. While with pre-hashing the rock you i got the time of checking ...
0
votes
1answer
66 views

Is a simple funcion thread safe

if I have this type of program level function def returnInt(s): return int(float(s)) and it ended up being called by 2 separate threads at the same time would it be "thread safe" or do I need ...
1
vote
1answer
28 views

Logging in multi-processing and multi-threading python program?

I am writing the back end of an Online Judge ( code checker) in python 2.7 which takes submissions from database(using mysql) evaluates the submission and writes the result back to database.I am ...
0
votes
2answers
21 views

How do I poll multiple rss feeds with python?

How should I poll multiple rss feeds for changes in python? Should I loop through them or give each feed its own thread? (I will have probably around 1000 feeds all said and done)
0
votes
2answers
31 views

When to put locks for multi-threading and multi-processing?

Do I need to do this while printing to standard output: `lock.acquire()` #printing to standard output lock.release() For multi-threads and multi-processes. Also does this has to be done ...
1
vote
1answer
21 views

Possible locking issue in Tkinter application

I'm trying to create a sliding menubar for my tkinter application, but I've run into an issue that I suspect comes from my not locking a thread properly. While I have been dabbling with Python for a ...
-2
votes
0answers
36 views

Python 'while' function multiprocessing [closed]

I wanted to know how to make a 'while' function that reads a serial and save the data to a variable. But meanwhile, I have another function that plays áudio, but this function is also in a while, and ...
0
votes
0answers
29 views

Maximum limit of connections in pooled db?

I was using mysql with python 2.7.I used the following command to create pool of database connections:pool = PooledDB(mysql.connector, pool_size,database=MYSQL_DB, user=MYSQL_USER, ...
0
votes
0answers
27 views

Calling Pythonscript in Java - Slow Python after threading in Java

I'm invoking a python script from a java class like this: // build aruments for Script state.get().argv.clear(); state.get().argv.append(new PyString("")); state.get().argv.append(new PyString("-i" + ...
-1
votes
1answer
22 views

Tkinter: cannnot create messagebox in a thread

I'm a beginner at Tkinter. Yesterday, when I try to start a message box in a thread function, but it failed and stuck. I didn't find any useful information about this problem, so I asked here: from ...
1
vote
1answer
42 views

Why multi-threaded python program slow on ec2 micro-instance?

I am working on a Online Judge code checker.My code uses multi-threading in python 2.7.The same program on my local machine (i core 3 RAM 4GB) evaluates about 1000 submisions in 1 minute 10 seconds. ...
0
votes
0answers
40 views

High frequency thread with fixed frequency

I want to execute a task at a high frequency in python, where the task execution time is high relative to the period. Normally, I would use a thread which re-posts itself, for example: from ...
0
votes
2answers
26 views

is time.time() thread specific?

Is time.time() in python 2.7 function thread specific or a global function ?? I mean't to say for example I have the following common function for threads: while True: Now_time=time.time() ...

1 2 3 4 5 79
15 30 50 per page