Time-controlled execution?

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

    Time-controlled execution?

    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,
  • Paul Rubin

    #2
    Re: Time-controlled execution?

    faizan@jaredweb .com (Fazer) writes:[color=blue]
    > 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?[/color]

    The official home of the Python Programming Language

    Comment

    • Fazer

      #3
      Re: Time-controlled execution?

      Paul Rubin <http://phr.cx@NOSPAM.i nvalid> wrote in message news:<7xsmirtn2 i.fsf@ruckus.br ouhaha.com>...[color=blue]
      > faizan@jaredweb .com (Fazer) writes:[color=green]
      > > 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?[/color]
      >
      > http://python.org/doc/current/lib/node304.html[/color]

      Perfect! Thanks a lot!

      Comment

      Working...