473,396 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Subprocesses

Greetings strangers,

How do I make another process inside my program so that the created processes can run concurrently with the main processes?
Ex. I have a program that prints helloworld every 5 seconds. At initialization helloworld launches a program called goodbyeworld with os.system("goodbyeworld.py"). Goodbyeworld prints "goodbyeworld" every 5 seconds. However when goodbyeworld is started, helloworld stops working.
Mar 12 '08 #1
1 1137
Laharl
849 Expert 512MB
If you're running some flavor of Unix or Linux, look up fork(). It's in the os module and is nearly identical to the C version. If you're running Windows, I'm not sure what the equivalent is, sorry.
Mar 12 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jane Austine | last post by:
Running Python 2.3 on Win XP It seems like socket is working interdependently with subprocesses of the process which created socket. ------------------------------------ #the server side >>>...
2
by: Marcos | last post by:
Hi guys, I realise this question has been answered in one form or another many times before but I can't quite find the solution I need. I am trying to run multiple subprocesses from a python...
2
by: Dave Kirby | last post by:
I am working on a network management program written in python that has multiple threads (typically 20+) spawning subprocesses which are used to communicate with other systems on the network. This...
3
by: Dara Durum | last post by:
Hi ! Py2.4, Win32. I need to optimize a program that have a speciality: hash (MD5/SHA1) the file contents (many files). Now I do this in a simple python program, because (what a pity) the...
0
by: Jonathan Smith | last post by:
First a bit about what I'm trying to do. I need a function which takes a patchfile and patches a source directory. Thats it. However, I need to be able to do so no matter what the patchlevel (-px)...
0
by: Mitja Trampus | last post by:
I am trying to run a subprocess within given time and memory restrictions. The resource module kind of works for me, but I do not understand why and am seeking an explanation. Also, the signal...
1
by: betatim | last post by:
Hi, there are many ways of solving the problem of finite buffer sizes when talking to a subprocess. I'd usually suggest using select() but today I was looking for a more readable/understandable...
1
by: Gal Diskin | last post by:
Hi all, I'm writing a python program using threads to open several subprocesses concurrently (using module subprocess) and wait on them. I was wondering if there is a possibilty that a thread will...
3
by: cypher543 | last post by:
My app uses a "queue" of commands which are run one at a time. I am using the subprocess module to execute the commands in the queue. However, processes always run at the same time. How can I make...
11
by: geoffbache | last post by:
Hi, As part of my efforts to write a test tool that copes with GUIs nicely, I'm trying to establish how I can start a GUI process on Windows that will not bring up the window. So I try to hide...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.