473,386 Members | 1,753 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,386 software developers and data experts.

multiple processes with private working dirs

I have a bunch of processes to run and each one needs its own working
directory. I'd also like to know when all of the processes are finished.

(1) First thought was threads, until I saw that os.chdir was process-global.
(2) Next thought was fork, but I don't know how to signal when each child is
finished.
(3) Current thought is to break the process from a method into a external
script; call the script in separate threads. This is the only way I can see
to give each process a separate dir (external process fixes that), and I can
find out when each process is finished (thread fixes that).

Am I missing something? Is there a better way? I hate to rewrite this method
as a script since I've got a lot of object metadata that I'll have to
regenerate with each call of the script.

thanks for any suggestions,
--Tim Arnold
Sep 25 '08 #1
3 1123
On Sep 25, 3:37*am, "Tim Arnold" <tim.arn...@sas.comwrote:
Am I missing something?
Do you mean something other than the replies you got the last time you
asked the exact same question?

http://groups.google.com/group/comp....c13cbb84f88f2b
Sep 25 '08 #2
On Sep 25, 12:11*am, alex23 <wuwe...@gmail.comwrote:
On Sep 25, 3:37*am, "Tim Arnold" <tim.arn...@sas.comwrote:
Am I missing something?

Do you mean something other than the replies you got the last time you
asked the exact same question?

http://groups.google.com/group/comp....frm/thread/42c...
arggg. My newreader didn't show the initial post so I thought it never
made it through.
sorry for the noise.
--Tim Arnold
Sep 25 '08 #3
On 24 Sep, 19:37, "Tim Arnold" <tim.arn...@sas.comwrote:
Am I missing something? Is there a better way?
Use the pyprocessing module (to appear as standard module
multiprocessing in Python 2.6). It has almost the same interface as
Python's threading and Queue standard modules, except you are working
with processes not threads. To wait for a process to finish, just join
it like you would do with a thread.
http://pyprocessing.berlios.de/

Sep 25 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Dan Stromberg | last post by:
We will soon have 3 copies, for testing purposes, of what should be about 4.5 terrabytes of data. Rather than cmp'ing twice, to verify data integrity, I was thinking we could speed up the...
11
by: Mike | last post by:
Looking to find any information on how to properly configure multiple instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking for information on how the multiple instance settings...
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
5
by: Jeremy | last post by:
I have a core VB service that monitors a database, and based on data in the records will execute code to send email notifications. Problem: I don't want my main program code to halt and wait for...
4
by: Gregory Gadow | last post by:
I've cobbled together a PrinterClass that takes a text file and dumps it to a printer. The app using is has multiple threads, all of which need access to a shared instance. Can someone point me to...
12
by: Florian Lindner | last post by:
Hello, since ConfigParser does not seem to support multiple times the same option name, like: dir="/home/florian" dir="/home/john" dir="/home/whoever" (only the last one is read in)
3
by: Hartmut Dippon | last post by:
Hi all, I hope somebody can help me with following problem: I have an application where I can drag&drop files/dirs from within explorer onto my form. If multiple files/dirs are selected I...
6
by: Tim Arnold | last post by:
I have a bunch of processes to run and each one needs its own working directory. I'd also like to know when all of the processes are finished. (1) First thought was threads, until I saw that...
0
by: Cameron Simpson | last post by:
On 24Sep2008 18:27, Tim Arnold <a_jtim@bellsouth.netwrote: | I have a bunch of processes to run and each one needs its own working | directory. I'd also like to know when all of the processes are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.