Timer

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

    #31
    Re: Timer

    Derek Fountain a écrit :[color=blue]
    > Does Python have a timer mechanism? i.e. an "after 500 milliseconds, run
    > this bit of code" sort of thing?[/color]

    The sched module in the standard library may be what you're looking for.

    --
    Alexandre Fayolle
    LOGILAB, Paris (France).
    http://www.logilab.com http://www.logilab.fr http://www.logilab.org
    Développement logiciel avancé - Intelligence Artificielle - Formations

    Comment

    • Michael Hudson

      #32
      Re: Concurrency models (was: Timer)

      Alex Martelli <aleax@aleax.it > writes:
      [color=blue]
      > Michael Hudson wrote:
      > ...[color=green][color=darkred]
      > >> and select -- it depends... but last time I checked I
      > >> saw no way to get the "callback on file activity" from
      > >> Tkinter as I could back when I used Tcl/Tk...).[/color]
      > >
      > > Huh? _tkinter.create filehandler() is there (pyrepl uses it). I think
      > > only on Unix, but I think that also applies to Tcl_CreateFileH andler,
      > > so that's not much of a surprise.[/color]
      >
      > I could have sworn I got "callbacks on file activity" cross-platform
      > when I used Tcl/Tk, but maybe it's just a memory grown rosy with age.[/color]

      Well, maybe. I haven't been near a Windows system in months & months
      and have never used Tcl/Tk in isolation, so please don't be surprised
      when I'm wrong about Tcl on windows :-)

      Cheers,
      mwh

      --
      Make this IDLE version 0.8. (We have to skip 0.7 because that
      was a CNRI release in a corner of the basement of a government
      building on a planet circling Aldebaran.)
      -- Guido Van Rossum, in a checkin comment

      Comment

      Working...