Threading Or Other Suggestions?!?

Discussion in 'Python' started by andrea.gavana@agip.it, Jan 14, 2005.

  1. Guest

    Hello NG,

    I have a wxPython application that does a lot of things. One of them,
    in particular, I have doubts on how to implement it. Essentially, this part
    of my application calls an external executable (an oil reservoir
    simulator). What I would like to do, is to give the user the possibility to
    run more than 1 simulation at the same time. This means:

    1) Writing the executable "data file" needed by the simulator
    2) Run the executable file (and wait until completion)
    3) Examine the simulation results

    For this, I was thinking about threads... does anyone have other/better
    suggestion(s)? Does anyone see any difficulty/memory problems in using
    threads?

    Thanks to you all for every suggestion.

    Andrea.

    ------------------------------------------------------------------------------------------------------------------------------------------
    Message for the recipient only, if received in error, please notify the
    sender and read http://www.eni.it/disclaimer/
    , Jan 14, 2005
    #1
    1. Advertising

  2. Aahz Guest

    In article <>,
    <> wrote:
    >
    > I have a wxPython application that does a lot of things. One of them,
    >in particular, I have doubts on how to implement it. Essentially, this part
    >of my application calls an external executable (an oil reservoir
    >simulator). What I would like to do, is to give the user the possibility to
    >run more than 1 simulation at the same time. This means:
    >
    >1) Writing the executable "data file" needed by the simulator
    >2) Run the executable file (and wait until completion)
    >3) Examine the simulation results
    >
    >For this, I was thinking about threads... does anyone have other/better
    >suggestion(s)? Does anyone see any difficulty/memory problems in using
    >threads?


    If you're not on Windows, this will be much easier with multiple
    processes.
    --
    Aahz () <*> http://www.pythoncraft.com/

    "19. A language that doesn't affect the way you think about programming,
    is not worth knowing." --Alan Perlis
    Aahz, Jan 14, 2005
    #2
    1. Advertising

  3. chrisg Guest

    You could also use os.spawnl to launch it in a separate process.
    chrisg, Jan 15, 2005
    #3
  4. Tim Roberts Guest

    wrote:
    >
    > I have a wxPython application that does a lot of things. One of them,
    >in particular, I have doubts on how to implement it. Essentially, this part
    >of my application calls an external executable (an oil reservoir
    >simulator). What I would like to do, is to give the user the possibility to
    >run more than 1 simulation at the same time. This means:
    >
    >1) Writing the executable "data file" needed by the simulator
    >2) Run the executable file (and wait until completion)
    >3) Examine the simulation results
    >
    >For this, I was thinking about threads... does anyone have other/better
    >suggestion(s)? Does anyone see any difficulty/memory problems in using
    >threads?


    Yes. Threads are used to run multiple parts of your own program. To run
    another program, you need to launch a new process.

    You can still monitor it.
    --
    - Tim Roberts,
    Providenza & Boekelheide, Inc.
    Tim Roberts, Jan 15, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    423
    Michael Hoffman
    Apr 24, 2007
  2. Replies:
    9
    Views:
    1,035
    Mark Space
    Dec 29, 2007
  3. Daniel Pitts
    Replies:
    7
    Views:
    431
    Erik Wikström
    Apr 1, 2008
  4. Steven Woody
    Replies:
    0
    Views:
    404
    Steven Woody
    Jan 9, 2009
  5. Steven Woody
    Replies:
    0
    Views:
    445
    Steven Woody
    Jan 9, 2009
Loading...

Share This Page