multiple processes with private working dirs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim Arnold

    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


  • alex23

    #2
    Re: multiple processes with private working dirs

    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?


    Comment

    • Tim Arnold

      #3
      Re: multiple processes with private working dirs

      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

      Comment

      • sturlamolden

        #4
        Re: multiple processes with private working dirs

        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.


        Processing ist eine Programmiersprache, Entwicklungsumgebung und Online-Community. Seit 2001 fördert Processing die Softwarekompetenz in der bildenden Kunst und die visuelle Kompetenz in der Technologie. Heute gibt es Zehntausende von Studenten, Künstlern, Designern, Forschern und Hobbyisten, die Processing für das Lernen, Prototyping und die Produktion nutzen. Die Verarbeitung wurde zunächst mit einer Java-basierten Syntax und einem ... Weiterlesen ...






        Comment

        Working...