Time-controlled execution?

Discussion in 'Python' started by Fazer, Jan 7, 2004.

  1. Fazer

    Fazer Guest

    Hello,

    Lets say that I need to open a large file in Python. However, I only
    want this operation to take no more than four seconds. If it takes
    longer than four seconds to open this file, abort the process. How
    can I do this?

    Thanks,
     
    Fazer, Jan 7, 2004
    #1
    1. Advertising

  2. Fazer

    Paul Rubin Guest

    (Fazer) writes:
    > Lets say that I need to open a large file in Python. However, I only
    > want this operation to take no more than four seconds. If it takes
    > longer than four seconds to open this file, abort the process. How
    > can I do this?


    http://python.org/doc/current/lib/node304.html
     
    Paul Rubin, Jan 7, 2004
    #2
    1. Advertising

  3. Fazer

    Fazer Guest

    Paul Rubin <http://> wrote in message news:<>...
    > (Fazer) writes:
    > > Lets say that I need to open a large file in Python. However, I only
    > > want this operation to take no more than four seconds. If it takes
    > > longer than four seconds to open this file, abort the process. How
    > > can I do this?

    >
    > http://python.org/doc/current/lib/node304.html


    Perfect! Thanks a lot!
     
    Fazer, Jan 8, 2004
    #3
    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. kevin bailey
    Replies:
    1
    Views:
    490
    bruce barker
    Nov 24, 2004
  2. Michael N. Christoff

    Mars Rover Controlled By Java

    Michael N. Christoff, Jan 16, 2004, in forum: Java
    Replies:
    146
    Views:
    6,257
    Greg Gauthier
    Jan 5, 2005
  3. flamesrock
    Replies:
    8
    Views:
    477
    Hendrik van Rooyen
    Nov 24, 2006
  4. Replies:
    9
    Views:
    390
    Michael DOUBEZ
    Feb 5, 2009
  5. Kelvin
    Replies:
    1
    Views:
    207
    Aaron Bertrand [SQL Server MVP]
    Jul 13, 2005
Loading...

Share This Page