Questions tagged [multiprocess]

Concerning running parallel code in separate processes (unlike multithreading) and/or related to package `multiprocess` from PyPI.

462 questions
0
votes
1 answer

Selenium Multiprocessing Help in Python 3.4

I am in over my head trying to use Selenium to get the number of results for specific searches on a website. Basically, I'd like to make the process run faster. I have code that works by iterating over search terms and then by newspapers and outputs…
0
votes
1 answer

Confused regarding python positional arguments, something like args=(i,)

Let's say I tested the following code to see the sub process pool act: # coding=utf-8 import os import sys from multiprocessing import Pool import time import random def run_proc(param1): print("child procees %s pid is %s,parent id is %s" % …
XpreZ
  • 1
  • 1
0
votes
1 answer

Interactive session with another application in child process in Python

I have an application(.exe) written in any language eg. C++ and want to run the application from python. I can run that simple application by using below sample Python code by following tutorial here…
flamelite
  • 2,654
  • 3
  • 22
  • 42
0
votes
0 answers

Android multiprocess IPC fail

Unable to get the log from app This is my code: ------------------AndroidManifest.xml-------------
syuunami
  • 11
  • 1
0
votes
1 answer

Forking and Waiting in linux (C++).

I want to fork a process and then do the following in the parent: Wait until it terminates naturally or timeout period set by the parent expires (something like waitforsingalobject in windows) after which I will kill the process using kill(pid);…
SFD
  • 565
  • 7
  • 18
0
votes
1 answer

multiprocess does not work well with nested functions in some cases

I have a piece of code stored in a string (user edits this in a text box in my application). In this code, there is a function which I want to run later using multiprocess.Pool. But it does not work if the functions defined in the string are…
0
votes
0 answers

catching exceptions in python3 multiprocessing

My use-case it to catch all the exceptions that occur in python multiprocessing processes. So with the help of some web search, I came up with the following code: import multiprocessing as mp class Process(mp.Process): def __init__(self, *args,…
manav
  • 217
  • 1
  • 2
  • 11
0
votes
0 answers

Open script in a new shell via script

I'd like to run a script (scriptA) that will execute another script (scriptB) in another window while scriptA is still running. I tried: subprocess.Popen(['python', 'scriptB.py']) but it runs scriptB in the scriptA's window. Could someone help…
Inako
  • 1
  • 1
0
votes
1 answer

How to kill an Android app background process?

I have an app with two processes. The second process starts when an Activity is created. Find below an excerpt of that Activity in the Manifest:
dalmendray
  • 51
  • 1
  • 6
0
votes
0 answers

How to use multiprocess with Tkinter in Raspberry Pi Python

I am trying to move two servos at the same time. But I cant move it. Because 2nd motor moving after finish the first motor movement which I command over tkinter scale. I have imported Process from multiprocess and tried. When i change scale…
blocer
  • 1
  • 2
0
votes
1 answer

multiprocess sub-function does not return any results

I am trying to use concurrency function provided by deco module. The code is working without multiple threads as shown in the answer here: Extract specific columns from a given webpage But the following code does not return any element for finallist…
shantanuo
  • 31,689
  • 78
  • 245
  • 403
0
votes
1 answer

Parent's owned object in Python multiprocessing

I created a class that will generate multiple child processes, but do not want some of the parent process's objects to be copied over multiple child processes. For example, proc1 and proc2 in class x below copied their parent's variables 'a' and 'b'…
Knoel
  • 13
  • 5
0
votes
1 answer

One python multiprocess errors

I have one multprocess demo here, and I met some problems with it. Researched for a night, I cannot resolve the reason. Any one can help me? I want to have one parent process acts as producer, when there are tasks come, the parent can fork some…
Wyatt Fang
  • 39
  • 4
0
votes
1 answer

Trouble starting multiprocess threads and using events

I am trying to feed both an event and a queue to my worker threads. The queue is for them to talk to each other the event is for signalling them to stop working when needed. I keep getting this error and I cant quite figure out what is wrong with my…
Kyle Sponable
  • 735
  • 1
  • 12
  • 31
0
votes
1 answer

Tornado multiple processes: create multiple MySQL connections

I'm running a Tornado HTTPS server across multiple processes using the first method described here http://www.tornadoweb.org/en/stable/guide/running.html (server.start(n)) The server is connected to a local MySQL instance and I would like to have a…
pAkY88
  • 6,262
  • 11
  • 46
  • 58